Pattern
ElementsA quiet dotted or gridded canvas that follows your palette.
ReadyResponsive
Usage
Package exportimport { Pattern } from "@jnpll/elements-ui/pattern";
<Pattern pattern="dots" spacing={12} size={0.7} className="flex min-h-52 w-full items-center justify-center p-6">
<span>{"Pattern"}</span>
</Pattern>Examples
Grid with faded edges
Pattern
API Reference
| Prop | Type / description | Default |
|---|---|---|
pattern | "dots" | "grid" | "none"Background pattern. | "dots" |
spacing | numberPattern spacing in pixels, at least 2. | 12 |
size | numberDot radius or grid line width in pixels. | 0.7 |
color | stringPattern colour; accepts CSS colours and variables. | var(--border) |
background | stringSurface background colour. | var(--background) |
fade | booleanFades the pattern toward the edges, without fading content. | false |
children | ReactNodeContent placed above the pattern. | - |
className | stringControls dimensions, padding, and geometry. | - |
Composition & accessibility
The pattern is decorative and hidden from assistive technology. Content stays readable when the pattern fades. Set dimensions and spacing with className; colours default to the theme's background and border tokens.