Skip to main content
  1. Docs
  2. Components
  3. Layout

Scroll area

A scrolling region with Qeetrix scrollbars; it takes keyboard focus when its content overflows.

Import
@qeetrix/react
Status
StableSince 0.0.2
Renders
<div role="region">Server-rendered
Tested
WCAG 2.2 AAaxe on every pull request

01

When to use

Use it for
  • A long list in a fixed space: a panel's events.
  • A long line, sideways: a URL, a key.
Not for
  • The page itself: let the window scrollStack
  • A wide table: it scrolls itselfTable
  • Content that foldsAccordion

02

Anatomy

  1. 1scroll-area-viewport<div>What scrolls: a named region that takes focus when it overflows. Its 8px scrollbars show on hover, while scrolling and on focus.

03

Do and don't

Name it
Doaria-label: the region is announced, and found by landmark.
Don'tUnnamed: a focusable box nobody can identify.

04

Content

  • Name it for what it holds: "Audit events".
  • Give it a height, or it never scrolls.
Next — Scroll areaAPI