v0.3.1 StableFoundation ComponentReact 18 & 19Zero Runtime CSS
ScrollArea
Native scrolling with a named keyboard focus target.
Interactive preview
- Project update 1A small improvement to your workspace.
- Project update 2A small improvement to your workspace.
- Project update 3A small improvement to your workspace.
- Project update 4A small improvement to your workspace.
- Project update 5A small improvement to your workspace.
- Project update 6A small improvement to your workspace.
- Project update 7A small improvement to your workspace.
- Project update 8A small improvement to your workspace.
- Project update 9A small improvement to your workspace.
- Project update 10A small improvement to your workspace.
- Project update 11A small improvement to your workspace.
- Project update 12A small improvement to your workspace.
Usage
import { ScrollArea } from "@devvy-ui/react";
<ScrollArea label="Activity history" style={{maxHeight:240}}>{history}</ScrollArea>API reference
Native HTML attributes, className, style and a forwarded ref are supported. Component-specific props:
| Prop | Type | Default | Description |
|---|---|---|---|
| axis | vertical / horizontal / both | vertical | Overflow axes. |
| label | string | required | Scrollable region name. |
| native div props | HTMLAttributes | — | Children, style, ref and focus customization. |
Accessibility & behavior
Platform Behavior & Guidelines
Native scrollbars and touch/keyboard scrolling are preserved. No wheel interception or simulated scrolling. Keep an appropriate height or width constraint.
Source ownership
Run npx @devvy-ui/cli init once in your React project, then add the source:
npx @devvy-ui/cli add scroll-areaMake the source yours.
Start from the canonical implementation used by the package and registry. Change the code, keep the MIT notice, and build the behavior your project needs.
ScrollArea.tsxREACT / TSX
Edit your own copy. Downloaded source uses your changes; the component preview above uses the shipped version. Run the source installer first to include shared helpers.