Hatch Pattern
ProNewFine 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
| Prop | Type | Default |
|---|---|---|
| spacing | numberDistance between lines, perpendicular to the stroke, in CSS pixels. | 8 |
| angle | numberLine direction as a CSS gradient angle, in degrees. | 135 |
| className | stringUse text color utilities to tint the lines. | — |
| style | CSSProperties | — |
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.