#181
Responsive Grid
A Grid with responsive column counts and gaps holding eight numbered cells.
Hand this to your AI. It names the exact library parts, timings and accessibility promises of this demo.
Build the "Responsive Grid" pattern (@codeatlasdev/ui demo #181, layout/layout-primitives) in my app.
Call get_demo({ ids: ["#181"] }) first and keep its structure. It needs @codeatlasdev/[email protected].
Use: Card galleries and dashboards that go from one column on phones to four on large screens.
Keep these library parts, with the props and tokens the demo uses:
- Grid, Box from "@codeatlasdev/ui"
Behaviour to keep:
- `<Grid columns={{ base: 1, sm: 2, lg: 4 }} gap={{ base: '2', md: '4' }} p="4">`
- `{#each [1, 2, 3, 4, 5, 6, 7, 8] as n (n)}` renders 8 `<Box class="cell" p="4">` cells labelled by `{n}`
Reduced motion: the demo handles it; keep that branch.
Keyboard: not an interactive control.
Change only the copy and the data. Use the theme tokens (--ca-*), never raw colours. Library parts
- Grid
@codeatlasdev/ui - Box
@codeatlasdev/ui
How it is built
- `<Grid columns={{ base: 1, sm: 2, lg: 4 }} gap={{ base: '2', md: '4' }} p="4">`
- `{#each [1, 2, 3, 4, 5, 6, 7, 8] as n (n)}` renders 8 `<Box class="cell" p="4">` cells labelled by `{n}`
Related
Loading source.