Skip to content
Component

Scroll Area

Thin, theme-aware scrollbars (wraps Base UI ScrollArea).

Vertical scroll

Horizontal scroll

Content wider than the frame scrolls sideways on its own thin scrollbar. Both scrollbars stay hidden until the area is hovered or scrolled.

Style the viewport

className sizes the outer frame; viewportClassName reaches the scrolling viewport inside it. Once content overflows, the viewport is what takes keyboard focus, so a focus ring belongs there.

  • Tab to the area, then scroll it with the arrow keys, Page Up and Page Down

API reference

classNameNone
string

Max height/width of the visible viewport before scrolling kicks in.

viewportClassNameNone
string

Extra classes for the scrolling viewport inside, rather than the outer frame.

Also accepts everything from React.ComponentPropsWithoutRef<typeof import("@base-ui/react/scroll-area").ScrollArea.Root>.

Coding agents read this reference, with its examples, from the version your project has installed, through the Fuji UI MCP server. Set up your agent