Skip to content
SENVENLI UI

Scroll area

A region that scrolls inside a height limit with thin themed scrollbars, keyboard reachable.
A long list in a short box
import { ScrollArea } from "@senvenli/react/layout";

Examples

Horizontal

Wide content scrolls sideways inside its column; the parent sets the width.

Filling a pane

Between a fixed header and footer, the area takes the height that is left.

Guidelines

When to use it

  • A long list or pane must stay within a fixed height.

Use something else when

  • Rows need a sticky header, paging and their own scrolling. Data table
  • Long side content belongs in a panel opened on demand. Drawer

Accessibility

Keyboard

KeysWhat happens
TabMoves focus into the region so arrow keys scroll it.

Built in

  • The region is focusable and announced by its label.

You provide

  • An aria-label that names the region.

API reference

ScrollArea

childrenRequired
React.ReactNode
aria-labelRequired
string

Names the region; screen readers announce it when focus enters.

maxHeight
string | number

The region's height limit ("320px", 320, "60vh"); for horizontal areas, set the width on the parent.

fill
booleanDefault false

Fills the parent's height and scrolls inside it, for a pane in a flex column or a grid row that is given its height: a conversation's messages between its header and the reply box, a list beside it. The parent must give the area a definite height (min-h-0 on a flex or grid child). Leave maxHeight out when filling.

orientation
"both" | "horizontal" | "vertical"Default "vertical"