Examples

Vertical order activity

Preview
  1. Quote approved by Finance
  2. Purchase order sent to vendor
  3. Delivery confirmed by Operations
  4. Invoice added to the payment queue
  5. Payment scheduled for Friday
  6. Receipt uploaded to the order
Example.tsx
import { ScrollArea } from '@reactloom/ui';

const activity = [
  'Quote approved by Finance',
  'Purchase order sent to vendor',
  'Delivery confirmed by Operations',
  'Invoice added to the payment queue',
  'Payment scheduled for Friday',
  'Receipt uploaded to the order',
];

export default function Example() {
  return (
    <ScrollArea aria-label="Order activity" stableGutter style={{ maxBlockSize: '8rem', inlineSize: '100%' }}>
      <ol>{activity.map((entry) => <li key={entry} style={{ paddingBlock: '0.5rem' }}>{entry}</li>)}</ol>
    </ScrollArea>
  );
}

Horizontal customer segments

Preview
Example.tsx
import { ScrollArea, Stack, Tag } from '@reactloom/ui';

const segments = ['New customers', 'Renewing accounts', 'At-risk accounts', 'Enterprise trials', 'Self-service upgrades'];

export default function Example() {
  return (
    <ScrollArea aria-label="Customer segments" orientation="horizontal" style={{ maxInlineSize: '20rem' }}>
      <Stack direction="row" gap="3" style={{ padding: '0.25rem' }}>
        {segments.map((label) => <Tag key={label}>{label}</Tag>)}
      </Stack>
    </ScrollArea>
  );
}

API reference

ScrollArea props
PropTypeDefault
aria-label · aria-labelledbyrequired
Supply a label or reference a visible heading.
string—
orientation
Axes that can scroll.
'vertical' | 'horizontal' | 'both''vertical'
stableGutter
Reserve room for classic scrollbars.
booleanfalse
tabIndex
Defaults to a tab stop when the region overflows.
number—
ref
References the scrolling viewport.
Ref<HTMLDivElement>—

Customization

Extracted from the component’s source on every build, so it matches the code. How the layers fit together is explained in Customization.

State attributes

Target these in your CSS to style states without depending on class names.

AttributeValues
[data-orientation]present when on
[data-stable-gutter]present when on

Theme tokens it reads

--pl-focus-ring-color --pl-focus-ring-width

Accessibility

An overflowing region becomes a tab stop. The browser handles scroll gestures and keyboard scrolling, including the reading direction.

Keyboard interactions
KeyAction
TabFocus the scrolling viewport or a control inside it
Arrow keys or Page Up / DownScroll in supported directions

Usage guidelines

Do

  • Constrain the block size, inline size, or both to establish a scrollable viewport.

Don’t

  • Avoid nesting several scroll regions in the same direction.