Search documentation

Search the documentation and open a page.

Augments native scroll functionality for custom, cross-browser styling.

Loading...

Installation

pnpm dlx shadcn@latest add @wirekyt/scroll-area

Composition

ScrollArea ├── ScrollAreaViewport │ └── ScrollAreaContent ├── ScrollBar │ └── ScrollAreaThumb └── ScrollAreaCorner (optional)

Examples

Both Axes

Loading...

Default

Loading...

In A Popover

Loading...

Overflow Edges

Loading...

Scroll To

Loading...

Sticky Headers

Loading...

API Reference

Scroll Area

PropTypeDefaultDescription
idstring | undefined—Unique identifier used to connect the component parts.
idsElementIds—Overrides generated identifiers for individual parts.

Parts

ExportPurpose
ScrollAreaStyled ScrollArea part.
ScrollBarStyled ScrollBar part.
ScrollAreaContentContainer for the component's main content.
ScrollAreaCornerStyled ScrollAreaCorner part.
ScrollAreaThumbStyled ScrollAreaThumb part.
ScrollAreaViewportStyled ScrollAreaViewport part.

Context, Hooks, and Types

ExportAPI
ScrollAreaContextRender-prop component that exposes component state and actions.
ScrollAreaRootProviderProvides an externally created API to the component tree.
useScrollAreaCreates or accesses the component API.
useScrollAreaContextReturns the nearest component API.