Components / Backgrounds
Wavy Lines
Flowing ribbons of gradient lines that gently breathe and drift.
Go with the flow
Silky ribbons of color.
Installation
Requires React 18+ and Tailwind CSS.
- 1
Install dependencies
None. This component only needs React and Tailwind.
- 2
Add the component
Copy the code from the Code tab above into
components/ui/wavy-lines.tsx. - 3
Use it
example.tsximport { WavyLines } from "@/components/ui/wavy-lines"; export default function WavyLinesDemo() { return ( <WavyLines className="h-72 w-full rounded-2xl border border-zinc-200 bg-white dark:border-white/10 dark:bg-zinc-950"> <div className="pointer-events-none flex h-full flex-col items-center justify-center text-center"> <h3 className="text-2xl font-semibold text-zinc-900 dark:text-white">Go with the flow</h3> <p className="mt-1 text-sm text-zinc-600 dark:text-zinc-400">Silky ribbons of color.</p> </div> </WavyLines> ); }
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| lines | number | 14 | Number of lines. |
| amplitude | number | 48 | Max wave height (px). |
| speed | number | 1 | Speed multiplier. |
| colors | string[] | — | Gradient colors along each line. |