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

Import

scroll-area.tsx
// From the package: a build keeps only what it uses.
import { ScrollArea } from "@qeetrix/react";

// Or from its own path.
import { ScrollArea } from "@qeetrix/react/scroll-area";

02

Props

And every native attribute of the element it renders.

PropTypeDefaultWhat it does
orientation"vertical" | "horizontal" | "both""vertical"Which way it scrolls.
aria-label · aria-labelledbystring—Names the region; it goes on the viewport, which becomes a region landmark.
className · style…—Its size, e.g. blockSize: 320, and its placement.
childrenReactNode—What scrolls.

03

Parts

Each part carries a data-slot, for tests and placement.

data-slotElementWhat it is
scroll-area<div>The root.
scroll-area-viewport<div role="region">Named: role region, focusable when it overflows.
scroll-area-scrollbar<div>data-orientation.
scroll-area-thumb<div>The thumb.

04

A long value

A URL or a key wider than its box: sideways, named for what it holds, by keyboard too.

redirect-uri.tsx
<ScrollArea orientation="horizontal" aria-label="Authorization URL">
  <code>{authorizationUrl}</code>
</ScrollArea>
Next — Scroll areaAccessibility