#136
Horizontal scroll
A horizontal ScrollArea with an always visible scrollbar holding a row of 24 Tag chips inside a card.
Hand this to your AI. It names the exact library parts, timings and accessibility promises of this demo.
Build the "Horizontal scroll" pattern (@codeatlasdev/ui demo #136, display/scroll-area) in my app.
Call get_demo({ ids: ["#136"] }) first and keep its structure. It needs @codeatlasdev/[email protected].
Use: Overflowing chip, tag or filter rows that should scroll sideways instead of wrapping.
Keep these library parts, with the props and tokens the demo uses:
- ScrollArea, Card, Chip from "@codeatlasdev/ui"
Behaviour to keep:
- `<Card p="2" full>` wraps the area
- `<ScrollArea orientation="horizontal" type="always">`
- `{ length: 24 }` builds 24 tags labelled Tag 1 to Tag 24, each rendered as `<Chip label={tag} />`
- Chips sit in a `<div class="row">` styled with `width: max-content` so the content overflows
Reduced motion: the demo handles it; keep that branch.
Keyboard: operable; keep the focus order and key handling.
Change only the copy and the data. Use the theme tokens (--ca-*), never raw colours. Library parts
- ScrollArea
@codeatlasdev/ui - Card
@codeatlasdev/ui - Chip
@codeatlasdev/ui
How it is built
- `<Card p="2" full>` wraps the area
- `<ScrollArea orientation="horizontal" type="always">`
- `{ length: 24 }` builds 24 tags labelled Tag 1 to Tag 24, each rendered as `<Chip label={tag} />`
- Chips sit in a `<div class="row">` styled with `width: max-content` so the content overflows
Related
Loading source.