Grid
BetaRSC-safeL1 — Primitive de layout CSS Grid : colonnes fixes avec breakpoints (colsSm/Md/Lg) ou mode auto-fit (minChildWidth). RSC-safe, zéro dépendance client.
import { Grid } from "@lyra/tokens/components";Playground
1
2
3
Démo interactive — réglages du playground (props ajustables en direct) à venir.
<Grid cols={1} colsMd={2} colsLg={3} gap={5}>
<Card />
<Card />
<Card />
</Grid>
<Grid minChildWidth="240px" gap={4}>
{items.map((i) => <Card key={i.id} {...i} />)}
</Grid>Documentation
- cols=3123
- auto-fitABC
cols, colsSm, colsMd, colsLg, minChildWidth, gap, align, as<Grid cols={1} colsMd={2} colsLg={3} gap={5}>
<Card />
<Card />
<Card />
</Grid>
<Grid minChildWidth="240px" gap={4}>
{items.map((i) => <Card key={i.id} {...i} />)}
</Grid>- Aucune sémantique propre — le rôle vient du contenu ou de `as`.
- Breakpoints alignés sur --bp-sm/--bp-md/--bp-lg (480/768/1024).
- RSC-safe : aucune dépendance client, aucun hook.