GridBackground
A quiet line or dot grid behind a demo or hero, fading out toward the edges. Decorative only; the foreground keeps its full contrast.
Preview
GridBackground
A quiet line or dot grid behind a demo or hero, fading out toward the edges. Decorative only; the foreground keeps its full contrast.
Master
The line grid on the default surface. Variants shows dots, none and the inverse surface. The grid is aria-hidden and sits behind the content.
Usage
Behind a demo, hero or empty state, never behind dense data or long text. Lines sit every space.6 (24px) in border.faint, dots every space.4 (16px) in border.strong, and a radial mask fades them out from the centre, so it works on any surface. It is static: Paper's optional slow drift is not built.
Do's
- behind a product demo, hero or empty state on a docs or marketing page
- to frame one featured component in a showcase
Don'ts
- behind dense data UI, forms or long text
- as a layout grid — use layout classes and --grid-* tokens
- as a chart's gridlines — LineChart and BarChart draw their own
When to use
- behind a product demo, hero or empty state on a docs or marketing page
- to frame one featured component in a showcase
When not to use
- behind dense data UI, forms or long text
- as a layout grid — use layout classes and --grid-* tokens
- as a chart's gridlines — LineChart and BarChart draw their own
What an agent reads
import { GridBackground } from "agentic-ds-kit";- must
- the grid layer is aria-hidden and has no pointer events
- children are untouched and keep their contrast
- the grid is hidden under forced colours
- defaults
- variant lines
- inverse false
- stops if
- Do not put text directly on the grid without a surface behind it
- Do not hard-code cell sizes or columns
- Do not use raw hex
From contracts/gridbackground.json: must is the a11y requirements, defaults the prop defaults, stops if the doNot rules where the agent asks instead of inventing a cousin.
Props
| Name | Type | Required | Default | Notes |
|---|---|---|---|---|
| variant | lines | dots | none | No | lines | lines every space.6 (24px) in border.faint; dots every space.4 (16px) in border.strong. |
| inverse | boolean | No | false | surface.inverse with the grid at opacity.100 of line.inverse, edge to edge, no fade. |
| children | node | No | — | — |