sigilUI

Sigil Grid

A CSS Grid with visible cross marks at cell intersections, powered by the sigil grid tokens.

@sigil-ui/componentsReact

Preview

Live preview Interactive

Import

import { SigilGrid, SigilGridCell } from "@sigil-ui/components";

Usage

<SigilGrid columns={3}>
  <SigilGridCell>Cell 1</SigilGridCell>
  <SigilGridCell>Cell 2</SigilGridCell>
  <SigilGridCell>Cell 3</SigilGridCell>
  <SigilGridCell>Cell 4</SigilGridCell>
  <SigilGridCell>Cell 5</SigilGridCell>
  <SigilGridCell>Cell 6</SigilGridCell>
</SigilGrid>

The grid renders a subtle dot pattern at cell intersections using the --s-border color. This is the signature visual of Sigil UI — a calibration-grid aesthetic that emerges from the token system.

Columns

<SigilGrid columns={2}>...</SigilGrid>
<SigilGrid columns={3}>...</SigilGrid>
<SigilGrid columns={4}>...</SigilGrid>
<SigilGrid columns={5}>...</SigilGrid>
<SigilGrid columns={6}>...</SigilGrid>

Custom gap

{/* Pixel value */}
<SigilGrid columns={3} gap={32}>...</SigilGrid>

{/* CSS variable */}
<SigilGrid columns={3} gap="var(--s-rail-gap)">...</SigilGrid>

When no gap is specified, the grid uses --s-grid-cell (default 48px).

Cell hover

SigilGridCell includes a built-in hover effect that highlights the cell with --s-surface-elevated:

<SigilGrid columns={3}>
  <SigilGridCell>
    <h3>Feature one</h3>
    <p>Hover to highlight</p>
  </SigilGridCell>
  <SigilGridCell>
    <h3>Feature two</h3>
    <p>Subtle surface shift</p>
  </SigilGridCell>
</SigilGrid>

Feature grid pattern

A common layout for landing pages:

<SigilGrid columns={3} gap={24}>
  <SigilGridCell>
    <Stack gap={8}>
      <TokensIcon className="size-6 text-[var(--s-primary)]" />
      <h3>One token file</h3>
      <p>Change once, update everywhere. Every component reads
      from the same source.</p>
    </Stack>
  </SigilGridCell>
  <SigilGridCell>
    <Stack gap={8}>
      <AgentIcon className="size-6 text-[var(--s-primary)]" />
      <h3>Agent-friendly</h3>
      <p>Your agent edits one file. No scattered Tailwind
      classes to hunt down.</p>
    </Stack>
  </SigilGridCell>
  <SigilGridCell>
    <Stack gap={8}>
      <PresetIcon className="size-6 text-[var(--s-primary)]" />
      <h3>Ship a preset</h3>
      <p>Ship a preset, not a Tailwind config. Share complete
      themes as typed objects.</p>
    </Stack>
  </SigilGridCell>
</SigilGrid>

Without cells

You can use SigilGrid alone as a CSS Grid without the cell hover wrapper:

<SigilGrid columns={4} gap={16}>
  <div>Plain div</div>
  <div>No hover effect</div>
  <div>Still has the dot grid</div>
  <div>Background pattern</div>
</SigilGrid>

Token integration

CSS VariableUsed for
--s-grid-cellDefault gap value
--s-borderDot pattern color
--s-surface-elevatedCell hover background
--s-cross-armCross mark arm length (for custom sigil overlays)
--s-cross-strokeCross mark stroke width
--s-rail-gapAlternative gap value for rail-aligned layouts

Props

SigilGrid

PropTypeDefaultDescription
columns2 | 3 | 4 | 5 | 63Number of grid columns
gapstring | numbervar(--s-grid-cell)Gap between cells
classNamestring—Additional CSS classes
childrenReactNode—Grid content

Plus all standard <div> HTML attributes.

SigilGridCell

PropTypeDefaultDescription
classNamestring—Additional CSS classes
childrenReactNode—Cell content

Plus all standard <div> HTML attributes.

Accessibility

  • Semantic <div> elements — add role="list" and role="listitem" if the grid represents a list
  • Keyboard focus follows natural document order
  • Hover effect uses transition-colors with --s-duration-normal for reduced-motion compliance