Hulian UIv0.93.5413 components0 components
  • Start
  • Components
  • Blocks
  • Pages
  • Demos
  • Changelog
ChineseEnglish
  • ComponentsComponents
  • ThemeTheme

Backgrounds

  • DotPattern
  • GridPattern
  • StripedPattern
  • Spotlight
  • FadeMask
  • RetroGrid
  • Ripple
  • Meteors
  • Aurora
  • Particles
  • FlickeringGrid
  • WavyBackground
  • Silk
  • Iridescence
  • Threads
  • Orb
  • LiquidChrome
  • Balatro
  • Ballpit
  • Beams
  • ColorBends
  • DarkVeil
  • Dither
  • DotField
  • EvilEye
  • FaultyTerminal
  • Ferrofluid
  • FloatingLines
  • Galaxy
  • GradientBlinds
  • Grainient
  • GridDistortion
  • GridMotion
  • GridScan
  • Hyperspeed
  • LetterGlitch
  • Lightfall
  • Lightning
  • LightPillar
  • LightRays
  • LineWaves
  • LiquidEther
  • PixelBlast
  • PixelSnow
  • Plasma
  • PlasmaWave
  • Prism
  • PrismaticBurst
  • Radar
  • RippleGrid
  • ShapeGrid
  • SideRays
  • SoftAurora

Overlay Effects

  • BorderBeam
  • ShineBorder
  • GlareHover
  • Lens
  • AnimatedBeam
  • OrbitingCircles
  • ProgressiveBlur
  • CardSpotlight
  • Reveal
  • Antigravity
  • BlobCursor
  • ClickSpark
  • Crosshair
  • ElectricBorder
  • GhostCursor
  • GradualBlur
  • ImageTrail
  • LaserFlow
  • MagicRings
  • Magnet
  • MagnetLines
  • MetaBalls
  • MetallicPaint
  • OrbitImages
  • PixelTrail
  • PixelTransition
  • Ribbons
  • ShapeBlur
  • SplashCursor
  • StarBorder
  • StickerPeel
  • TargetCursor
  • Cubes
  • Tilt
  • BorderGlow
  • GlassIcons
  • GlassSurface
  • Lanyard
  • ModelViewer
  • FluidGlass

WavyBackground

wavy-background

Renders layered multicolor waves with a canvas value-noise field.

Usage

Basic usage

WavyBackground comes with canvas background + centered content layer, children can put the title directly; the default is chart token.

WavyBackground
tsx
<WavyBackground containerClassName="h-64 w-full">
  <span className="text-sm font-medium text-foreground">WavyBackground</span>
</WavyBackground>

Animation speed

speed="slow" makes the waves slower and more relaxed, and "fast" makes the waves more active.

slow
tsx
<WavyBackground speed="slow" containerClassName="h-64 w-full">
  <span className="text-sm font-medium text-foreground">slow</span>
</WavyBackground>

Blur intensity

blur controls the softness of the band. When blur=0, the edge is sharp and the band outline is clear.

blur=0
tsx
<WavyBackground blur={0} containerClassName="h-64 w-full">
  <span className="text-sm font-medium text-foreground">blur=0</span>
</WavyBackground>

Custom color

colors Pass a set of color values ​​(recommended 5) to customize the brand wavy belt.

custom
tsx
<WavyBackground
  colors={["#a855f7", "#6366f1", "#c084fc", "#818cf8", "#a855f7"]}
  blur={8}
  containerClassName="h-64 w-full"
>
  <span className="text-sm font-medium text-white">custom</span>
</WavyBackground>

When to Use

Use it for soft, flowing color bands behind a hero or marketing section. Its dependency-free Canvas noise looks more liquid than the pure CSS Aurora, at the cost of Canvas rendering. Use GridPattern or DotPattern for regular geometry. The exported valueNoise2D helper can drive custom waveforms.

Import

ts
import { WavyBackground, valueNoise2D } from "@hulianui/ui"

Props

NameTypeDefaultDescription
colorsstring[]Chart tokensWave colors; accepts any CSS color string, including var(--…), and resolves computed values after mount
waveWidthnumber50Wave stroke width in pixels; higher values produce thicker bands
backgroundFillstring--color-background / --color-bgBackground fill color, translucent drawing of each frame produces smear
blurnumber10canvas filter blur (px), 0=no blur
speed"slow" | "fast""fast"Animation speed
waveOpacitynumber0.5Overall transparency of each wave (0-1)
classNamestring-Content container class (wrapper div overlaid on the wave)
containerClassNamestring-Outer root container class
containerPropsOmit<HTMLAttributes<HTMLDivElement>, "className"> & Record<\data-${string}\, …>-Attributes forwarded to the outer root div, including custom data-* attributes

Slots

SlotTypeDescription
childrenReactNodeContent above the wave (absolute centered overlay)

Usage Guidelines

  • Based on canvas, client rendering is required; it will automatically drop to a still frame under prefers-reduced-motion. Remember to turn off the system switch when verifying the animation.
  • The container size is expanded with containerClassName (such as h-full w-full), and the outer parent needs to be relative + overflow-hidden.
  • colors/backgroundFill supports var(--…), parsed after mounting - the first frame of SSR will not have color, which is normal.

Related

DotPattern · GridPattern · StripedPattern · Spotlight · RetroGrid · Ripple

Playground

WavyBackground
<WavyBackground
  speed="fast"
  blur={10}
  waveWidth={50}
  waveOpacity={0.5}
  containerClassName="h-64 w-full"
>
  <h2 className="text-2xl font-bold">Hello, Waves</h2>
</WavyBackground>
PreviousFlickeringGridDecorationNextSilk

On this page

  • Usage
  • Documentation
    • When to Use
    • Import
    • Props
    • Slots
    • Usage Guidelines
    • Related
  • Playground