Wavy Background
Blurred, translucent ribbons of brand colour flowing sideways on a canvas.
- 2.8 KB gzipped
- Zero dependencies
- Reduced-motion safe
- Base UI & Radix compatible
Make some waves
Installation
pnpm dlx shadcn@latest add https://velora.colorlib.com/r/wavy-background.jsonAdds components/velora/wavy-background.tsx.
Examples
Hero
A landing hero with a badge, headline and two calls to action over the waves.
Interfaces that feel alive
Motion-rich components that respect reduced motion, ship tiny and re-theme with seven CSS variables.
Props
| Prop | Type | Default |
|---|---|---|
wavesNumber of layered waves | number | 5 |
speedHow quickly the waves drift | "slow" | "fast" | "slow" |
blurBlur radius in px applied to the wave layer | number | 16 |
colorsAny CSS colours or custom property names (e.g. "--brand-from"); cycled across the waves | string[] | ["--brand-from", "--brand-via", "--brand-to"] |
opacityOpacity of each wave, 0–1 | number | 0.5 |
Also accepts every <div> attribute, forwarded to the root element.
Accessibility
- Reduced motion
- The waves do not move: the canvas paints one still frame of the ribbons and repaints it on resize and theme change.
- Keyboard
- Decorative — nothing to operate.
- Screen readers
- Decorative; the wrapper is aria-hidden, so only the content layered above is announced.