Seamless, automatic wave transitions between page sections. Context-aware, responsive, and customizable.
- ðŊ Automatic â Context detects adjacent sections, auto-generates waves
- ðĻ Color Matching â Waves auto-match section background colors
- ð 6+ Patterns â Smooth, organic, sharp, layered, mountain, custom
- ðžïļ Image Clipping â Background images follow the wave contour
- âĻ Effects â Shadows, glow, stroke, blur, texture, inner shadows
- ðŽ Animations â Flow, pulse, morph, ripple, bounce, drift, breathe + custom
- ðą Responsive â Different heights per breakpoint
- âŋ Accessible â Respects
prefers-reduced-motion - ðŠķ Lightweight â Zero runtime dependencies, tree-shakable
npm install wavy-bavyimport { WaveProvider, WaveSection } from 'wavy-bavy'
export default function Page() {
return (
<WaveProvider>
<WaveSection background="#ffffff">
<h1>Hero Section</h1>
</WaveSection>
<WaveSection background="#F7F7F5">
<h2>Features</h2>
{/* Wave auto-created: white â light gray */}
</WaveSection>
<WaveSection background="#191919">
<h2 style={{ color: '#fff' }}>Dark Section</h2>
{/* Wave auto-created: light gray â dark */}
</WaveSection>
</WaveProvider>
)
}That's it! Waves are automatically generated between sections.
<WaveSection pattern="smooth" /> {/* Classic sine curve */}
<WaveSection pattern="organic" /> {/* Irregular, natural shape */}
<WaveSection pattern="sharp" /> {/* Geometric angles */}
<WaveSection pattern="mountain" /> {/* Triangle peaks */}
<WaveSection pattern="layered" /> {/* Multiple overlapping waves */}<WaveSection preset="hero" /> {/* Tall, dramatic wave */}
<WaveSection preset="footer" /> {/* Subtle footer transition */}
<WaveSection preset="dramatic" /> {/* Large organic shape */}
<WaveSection preset="subtle" /> {/* Minimal wave */}
<WaveSection preset="angular" /> {/* Sharp geometric */}
<WaveSection preset="peaks" /> {/* Mountain range */}<WaveSection animate="flow" /> {/* Gentle horizontal drift */}
<WaveSection animate="pulse" /> {/* Vertical grow/shrink */}
<WaveSection animate="morph" /> {/* Shape morphing */}
<WaveSection animate="ripple" /> {/* Wave ripple */}
<WaveSection animate="bounce" /> {/* Subtle bounce */}
<WaveSection animate="drift" /> {/* Horizontal glide */}
<WaveSection animate="breathe" /> {/* Rhythmic amplitude */}
<WaveSection animate="undulate" /> {/* Full 2D wave motion */}
{/* Control speed */}
<WaveSection animate="flow" animationDuration={6} /><WaveSection
background="#1a1a2e"
pattern="organic"
height={200}
amplitude={0.7}
frequency={2}
seed={42} {/* Reproducible random shape */}
shadow={{ blur: 15, color: 'rgba(0,0,0,0.2)' }}
layers={3}
layerOpacity={0.25}
>
<h2>Fully Customized</h2>
</WaveSection><WaveProvider
defaults={{
height: 150,
pattern: 'organic',
amplitude: 0.6,
respectReducedMotion: true,
}}
debug={process.env.NODE_ENV === 'development'}
>
{/* All WaveSections inherit these defaults */}
</WaveProvider>| Prop | Type | Default | Description |
|---|---|---|---|
background |
string |
â | CSS color, gradient, or url()
|
backgroundImage |
string |
â | Image URL shorthand |
clipImage |
boolean |
false |
Clip background to wave shape |
preset |
string |
â | Named preset configuration |
wavePosition |
'top' | 'bottom' | 'both' | 'none' |
'both' |
Where to render waves |
height |
number | ResponsiveValue |
120 |
Wave height in px |
pattern |
PatternName |
'smooth' |
Wave pattern shape |
amplitude |
number |
0.5 |
Wave amplitude (0â1) |
frequency |
number |
1 |
Number of wave peaks |
phase |
number |
0 |
Horizontal offset (0â1) |
mirror |
boolean |
false |
Mirror the wave pattern |
seed |
number |
â | Seed for reproducible random patterns |
shadow |
boolean | ShadowConfig |
false |
Drop shadow effect |
glow |
boolean | GlowConfig |
false |
Glow effect |
stroke |
boolean | StrokeConfig |
false |
Stroke/outline on wave |
blur |
boolean | BlurConfig |
false |
Frosted glass effect |
texture |
boolean | TextureConfig |
false |
Texture overlay |
innerShadow |
boolean | InnerShadowConfig |
false |
Inner shadow effect |
animate |
AnimationName | false |
'none' |
Animation type |
animationDuration |
number |
4 |
Animation duration in seconds |
layers |
number |
1 |
Stacked wave layers |
layerOpacity |
number |
0.3 |
Opacity for extra layers |
as |
ElementType |
'section' |
HTML element type |
className |
string |
â | CSS classes |
overlap |
number |
0 |
Overlap with adjacent section (px) |
| Prop | Type | Default | Description |
|---|---|---|---|
defaults |
Partial<WaveDefaults> |
â | Global defaults for all sections |
debug |
boolean |
false |
Show debug overlay |
MIT ÂĐ Modulo-click