ScrollArea

A scroll container with styled, slim scrollbars and overflow shadows

Category: layout · WCAG 2.2-AA · scroll, overflow, scrollbar, container, layout

Props

PropTypeDefaultDescription
heightstringMax block size of the container (any CSS length)
widthstringMax inline size of the container (any CSS length)
orientation'vertical' | 'horizontal' | 'both'verticalWhich axes may scroll
edges'shadow' | 'mask' | 'none'shadowEdge affordance: box-shadow, a mask-image fade, or none
childrenReactNodeScrollable content

Design tokens

When to use

When not to use

How to build an accessible ScrollArea in React →

Examples

Vertical scroll

<ScrollArea height="12rem">
  <p>Long content…</p>
</ScrollArea>

Both axes

<ScrollArea height="12rem" width="20rem" orientation="both">
  <table>…</table>
</ScrollArea>

Related components

← Back to docs