Toggle Sidebar B
AppearanceLight & dark mode D

Line Sidebar

Static list navigation with a cursor-proximity effect that shifts and highlights nearby items.

Default

Move the pointer along the list and click an item to make it active. Every prop is wired to the controls underneath.

Light previewReplay previewOpen in new tab

Customize

Accent
Text
Marker
Falloff
Proximity Radius100px
Max Shift30px
Marker Length60px
Marker Gap0px
Tick Scale0.5
Item Gap20px
Font Size1.1rem
Smoothing100ms

API Reference

LineSidebar

PropTypeDefaultDescription
itemsstring[][...]Labels rendered as the list of sidebar entries.
accentColorstring"#A855F7"Color items and markers shift toward as the cursor gets close.
textColorstring"#c4c4c4"Resting color of the item labels.
markerColorstring"#6c6c6c"Resting color of the leading marker lines.
showIndexbooleantrueShow the zero-padded index before each label.
showMarkerbooleantrueShow the marker lines (and short ticks) beside each item.
proximityRadiusnumber100Vertical distance in pixels within which the cursor influences an item.
maxShiftnumber30Maximum horizontal shift in pixels the label slides at full proximity.
falloff"linear" | "smooth" | "sharp""smooth"Curve mapping cursor distance to the proximity effect.
markerLengthnumber60Length in pixels of the marker line; the in-between ticks scale from this too.
markerGapnumber0Gap in pixels between the labels and the markers.
tickScalenumber0.5Length of the in-between ticks as a fraction of markerLength.
scaleTickbooleantrueWhen true, the in-between ticks also grow with cursor proximity.
itemGapnumber20Vertical gap between items in pixels.
fontSizenumber1.1Font size of the labels in rem.
smoothingnumber100Transition duration in milliseconds for the proximity response.
defaultActivenumber | nullnullIndex of the item selected on mount.

LineSidebar events

PropTypeDefaultDescription
item-click(index: number, label: string) => void-Emitted when an item is clicked; the clicked item also becomes active.

Accessibility

Keyboard shortcuts and ARIA behavior.

  • The active item carries aria-current. Items are list entries, so wrap them in links or buttons when they navigate.