ScrollArea

Native scrolling with themed custom scrollbars for dense panels and lists.

Preview#

import {
  ScrollArea,
  ScrollAreaContent,
  ScrollAreaScrollbar,
  ScrollAreaThumb,
  ScrollAreaViewport,
} from "raft-ui";

<ScrollArea>
  <ScrollAreaViewport>
    <ScrollAreaContent />
  </ScrollAreaViewport>
  <ScrollAreaScrollbar>
    <ScrollAreaThumb />
  </ScrollAreaScrollbar>
</ScrollArea>

Both axes#

API#WIP

PropTypeDefaultDescription
...propsBase UI ScrollArea.Root.PropsRoot grouping for viewport, content, scrollbar, and corner parts.
PropTypeDefaultDescription
...propsBase UI ScrollArea.Viewport.PropsThe scrollable viewport. Overflow edge CSS variables live on this part.
PropTypeDefaultDescription
...propsBase UI ScrollArea.Content.PropsSized content wrapper inside the viewport.
PropTypeDefaultDescription
orientation"vertical" | "horizontal""vertical"Scrollbar axis.
...propsBase UI ScrollArea.Scrollbar.PropsCustom scrollbar track. Visible while scrolling via data-scrolling.
PropTypeDefaultDescription
...propsBase UI ScrollArea.Thumb.PropsDraggable thumb inside a scrollbar.
PropTypeDefaultDescription
...propsBase UI ScrollArea.Corner.PropsFills the intersection when both scrollbars are visible.