Pattern

Elements

A quiet dotted or gridded canvas that follows your palette.

Pattern
ReadyResponsive

Usage

Package export
tsx
import { 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

PropType / descriptionDefault
pattern"dots" | "grid" | "none"

Background pattern.

"dots"
spacingnumber

Pattern spacing in pixels, at least 2.

12
sizenumber

Dot radius or grid line width in pixels.

0.7
colorstring

Pattern colour; accepts CSS colours and variables.

var(--border)
backgroundstring

Surface background colour.

var(--background)
fadeboolean

Fades the pattern toward the edges, without fading content.

false
childrenReactNode

Content placed above the pattern.

-
classNamestring

Controls 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.