Skip to main content

Scrollbar

Custom scrollbar with accessible controls.

Usage

<w-scrollbar>
<w-slot body>
<div>
<!-- Scrollable content -->
</div>
</w-slot>
<w-slot rail>
<div>
<w-slot knob><div></div></w-slot>
</div>
</w-slot>
</w-scrollbar>

Props

PropTypeDefaultDescription
orientation"vertical" | "horizontal""vertical"Scroll direction

Slots

SlotElementDescription
contentContainerScrollable content area
trackContainerScrollbar track
thumbElementDraggable thumb

Keyboard

KeyAction
ArrowDown / ArrowRightScroll forward
ArrowUp / ArrowLeftScroll backward
Page DownScroll page forward
Page UpScroll page backward
HomeScroll to start
EndScroll to end

Accessibility

  • role="scrollbar" with proper ARIA
  • Keyboard accessible
  • Thumb position reflects scroll state