Skip to content
ProLifetime access for $199, paid once, every future release included
Truffle UI

Hatch Pattern

ProNew

Fine diagonal lines for empty states, insets and section details.

Installation

pnpm dlx shadcn@latest add @viewport/hatch-pattern

First time? Add the @viewport registry to components.json. Setup takes one minute.

Usage

The code behind the preview above comes with Truffle Pro.

Props

PropTypeDefault
spacingnumber

Distance between lines, perpendicular to the stroke, in CSS pixels.

8
anglenumber

Line direction as a CSS gradient angle, in degrees.

135
classNamestring

Use text color utilities to tint the lines.

—
styleCSSProperties—

Accessibility

  • Decorative and hidden from assistive technology.
  • Ignores pointer events and is hidden in forced-colors mode.
  • Static and requires no browser JavaScript to paint.