Scroll area
CoreA native scroll container with thin overlay scrollbars and edge fades that appear only when content overflows.
pnpm dlx shadcn@latest add https://wui.alann.works/r/scroll-area.jsonAPI Reference
| Prop | Type | Default |
|---|---|---|
children | ReactNode | — |
orientation | "vertical" | "horizontal" | "both" | — |
fade | number | — |
scrollbars | "auto" | "always" | — |
hideDelay | number | — |
maxHeight | CSSProperties["maxHeight"] | — |
snap | CSSProperties["scrollSnapType"] | — |
label | string | — |
wheelToHorizontal | boolean | — |
viewportClassName | string | — |
viewportStyle | CSSProperties | — |
viewportRef | Ref<HTMLDivElement> | — |
onScroll | (event: UIEvent<HTMLDivElement>) => void | — |
onEdgeChange | (edges: ScrollAreaEdges) => void | — |