Skip to content
Gelatin UIAlpha

Pattern

Free

Fill empty or reserved areas with hatch, dots, grid, or checker. The lines are a quiet mix of the foreground color, so they fit light and dark.

Tailwind CSS 4MIT + Commons Clause · 1 CSS file · 0 KB JavaScript
Studio BTuesday, Nov 18
09:00

Design review

Mara, Kenji, Lena

10:30
Free slot
12:00

Lunch with the Polar team

Café Central

LightDark
HatchDotsGridChecker
2346
pattern-hatch pattern-gap-2

Install

Add the utility's CSS with the CLI, your coding agent, or by hand. It has no JavaScript.

Usage

Put the class on the area to fill. Change the distance with pattern-gap-<n>, and the color with --pattern-color.

free-slot.tsx

Patterns

Four fills. Each one reads the same color and gap variables, so one set of options tunes them all.

  • Hatchpattern-hatch

    Reserved, blocked, or not bookable time and space.

  • Dotspattern-dots

    Canvas and drop zones: an area that waits for content.

  • Gridpattern-grid

    Editors and boards. A darker line every 5 cells helps the eye.

  • Checkerpattern-checker

    Behind a see-through image or color, so the alpha shows.

Color

With no value, the lines are a quiet mix of the foreground color, so they fit light and dark. Set --pattern-color for a colored fill.

  • Default: the foreground mix
  • Blue
  • Green
  • Red

Grid majors

On a grid, a darker line marks every few cells, like graph paper. Set the step, or remove it.

  • pattern-grid-major-4
  • pattern-grid-major-8
  • pattern-grid-major-none

Options

The modifier classes and the variables of the utility. Set a variable with an arbitrary property, such as [--pattern-color:var(--primary)].

NameKindDefaultDescription
pattern-gap-<n>class6 · 8 · 16pxThe distance from one line, dot, or cell to the next: n steps of the spacing scale. The default differs per pattern.
pattern-grid-major-<n>class5A darker grid line every n cells. pattern-grid-major-none removes it.
--pattern-colorvariableforeground mixThe line, dot, or cell color. With no value, a quiet mix of the foreground color.
--pattern-major-colorvariableforeground mixThe color of the darker grid line.
--pattern-checker-colorvariable12% · 16%The checker cell color, in light and dark. Stronger in dark, so a see-through color still reads.