Wave Pattern
ProNewRows of soft, even waves with adjustable length and height.
Installation
pnpm dlx shadcn@latest add @viewport/wave-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 |
|---|---|---|
| wavelength | numberLength of one full wave in CSS pixels. | 48 |
| amplitude | numberHeight of each crest in CSS pixels. | 4 |
| spacing | numberVertical distance between lines in CSS pixels. | 14 |
| 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.