FlowBackground

Decorative dots / grid / cross canvas background, drawn purely in CSS gradients.

Category: display · WCAG 2.1-AA · flow, background, grid, dots, canvas

Variants

Props

PropTypeDefaultDescription
variant'dots' | 'grid' | 'cross'dotsPattern style.
gapnumber20Cell spacing (px).
sizenumber1Dot radius / line thickness (px).
colorstringPattern color (defaults to the border token).
classNamestringAdditional CSS class names merged onto the root element.

Design tokens

When to use

When not to use

Examples

Dotted background

A dotted grid behind a flow canvas.

() => (
  <div style={{ position: 'relative', height: 220, overflow: 'hidden' }}>
    <FlowBackground variant="dots" gap={24} />
  </div>
)

Grid and cross

The grid and cross variants.

() => (
  <div style={{ display: 'grid', gap: 16, gridTemplateColumns: '1fr 1fr' }}>
    <div style={{ position: 'relative', height: 180, overflow: 'hidden' }}>
      <FlowBackground variant="grid" gap={28} />
    </div>
    <div style={{ position: 'relative', height: 180, overflow: 'hidden' }}>
      <FlowBackground variant="cross" gap={28} size={4} />
    </div>
  </div>
)

Related components

← Back to docs