#137
Vertical scroll
A vertical ScrollArea capped at 220px tall containing 20 Lorem ipsum rows inside a card.
Hand this to your AI. It names the exact library parts, timings and accessibility promises of this demo.
Build the "Vertical scroll" pattern (@codeatlasdev/ui demo #137, display/scroll-area) in my app.
Call get_demo({ ids: ["#137"] }) first and keep its structure. It needs @codeatlasdev/[email protected].
Use: Bounded panels such as activity logs or long option lists that scroll inside a fixed height.
Keep these library parts, with the props and tokens the demo uses:
- ScrollArea, Card from "@codeatlasdev/ui"
Behaviour to keep:
- `<Card full>` wraps the area
- `<ScrollArea maxHeight="220px">`
- `Array.from({ length: 20 }, (_, i) =>` builds items labelled Item 1 to Item 20: Lorem ipsum dolor sit amet
- Each row is a `<div class="item">` rendered with `{#each items as item}`
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
How it is built
- `<Card full>` wraps the area
- `<ScrollArea maxHeight="220px">`
- `Array.from({ length: 20 }, (_, i) =>` builds items labelled Item 1 to Item 20: Lorem ipsum dolor sit amet
- Each row is a `<div class="item">` rendered with `{#each items as item}`
Related
Loading source.