Halftone Pattern
ProNewA repeating screen of four dot sizes, inspired by printed halftones.
Installation
pnpm dlx shadcn@latest add @viewport/halftone-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 |
|---|---|---|
| size | numberWidth and height of the repeating four-dot tile in CSS pixels. | 24 |
| className | stringUse text color utilities to tint the dots. | — |
| 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.