Skip to content
Alea0.1

Layout

ScrollArea

A scrolling region with thin themed scrollbars and fades that show there is more.

Ant Design: -

import { ScrollArea } from '@alea/ui';

Examples

Scroll with fades

The fade shows there is more; the region is focusable when it scrolls.

v1.24.0: small fixes and new tokens

v1.23.0: small fixes and new tokens

v1.22.0: small fixes and new tokens

v1.21.0: small fixes and new tokens

v1.20.0: small fixes and new tokens

v1.19.0: small fixes and new tokens

v1.18.0: small fixes and new tokens

v1.17.0: small fixes and new tokens

v1.16.0: small fixes and new tokens

v1.15.0: small fixes and new tokens

v1.14.0: small fixes and new tokens

v1.13.0: small fixes and new tokens

v1.12.0: small fixes and new tokens

v1.11.0: small fixes and new tokens

v1.10.0: small fixes and new tokens

v1.9.0: small fixes and new tokens

v1.8.0: small fixes and new tokens

v1.7.0: small fixes and new tokens

v1.6.0: small fixes and new tokens

v1.5.0: small fixes and new tokens

v1.4.0: small fixes and new tokens

v1.3.0: small fixes and new tokens

v1.2.0: small fixes and new tokens

v1.1.0: small fixes and new tokens

Props

ScrollArea props

A scrolling region with thin themed scrollbars and fades that show there is more (Radix ScrollArea, Mantine ScrollArea). Focusable only when it scrolls.

PropTypeDefaultDescription
aria-labelrequiredstring-Name, so keyboard users can find and scroll it.
classNamestring-Extra class names for the root element.
direction"horizontal" | "vertical" | "both"'vertical'vertical (default), horizontal or both.
heightstring | number240Max height (or height) in px or CSS.

Accessibility

  • When it scrolls, it becomes a focusable named region so keyboard users can scroll it.

Keyboard

KeyDoes
TabFocuses the area when it scrolls
Arrow keys, Page Up / DownScroll it

Do and don't

Do

  • Give it an aria-label: it becomes a focusable region when it scrolls.
  • Keep enough height to show several lines.

Don't

  • Don't nest scroll areas.
  • Don't use it to hide content people must read.
Tested with axe, keyboard and screen reader roles