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

SplashCursor

splash-cursor

Emits colorful splashes and fading trails from pointer movement and clicks.

Usage

Basic usage

Place it in the relative container, drag the pointer to sputter the colored dye, and default to rainbow mode.

Move / click mouse within this area
tsx
<div className="relative h-64 overflow-hidden rounded-xl">
  <SplashCursor />
</div>

Fixed theme color

rainbow={false} Closes the hue cycle, and the single-color dye defaults to chart-1 token.

Single color dye · Eat chart-1 token
tsx
<SplashCursor rainbow={false} />

Violent tailing

High splatForce + High dissipation retention rate + large radius, swipe quickly to see long tails.

Move quickly to see the long tail
tsx
<SplashCursor splatForce={1.8} dissipation={0.97} splatRadius={72} />

Light and soft

opacity Darken the content and stack it below the light content to avoid overpowering the content.

Light base can also be layered with colors
tsx
<SplashCursor opacity={0.7} splatRadius={48} />

When to Use

Use it to add color splashes on pointer movement and burst spots on click in a hero, playful landing page, or full-page layer. This dependency-free Canvas 2D effect uses pointer-events-none, so it does not block interaction. For continuous trails, use Ribbons; for pixel afterglow, use PixelTrail.

Import

ts
import { SplashCursor } from "@hulianui/ui"

Props

NameTypeDefaultDescription
rainbowbooleantrueCycles each splash through the HSV hue wheel; when false, uses color
colorstringvar(--color-chart-1)Fixed sputtering color in non-rainbow mode, token must be prefixed with --color-; ignored for rainbow
splatRadiusnumber56Sputtering radius reference (px), the larger the color spot, the fuller it will be
splatForcenumber1Sputtering intensity: the displacement and trailing length of the splash with the pointer speed, recommended 0.5-2
dissipationnumber0.92Spot retention rate (attenuation per second, 0-1), the closer to 1 the more durable it is
opacitynumber1Overall opacity (0-1), can be dimmed when stacking content below
classNamestring-Additional class name for the root container, which fills a relative parent
styleCSSProperties-Inline styles forwarded to the root container

Usage Guidelines

  • Note that dissipation has "retention rate" semantics (the opposite of the original DENSITY_DISSIPATION): bigger is more durable, not bigger is faster to dissipate.
  • Non-rainbow mode color uses a variable prefixed with --color- for token; this value is ignored when rainbow is enabled. See [[hulian-token-color-var-needs-color-prefix]].
  • canvas2d with zero dependencies, and it ships pointer-events-none so it never blocks the

interaction underneath; the parent must be relative for absolute inset-0 to fill it. Under
reduced-motion it degrades and stops splashing.

  • Client component ("use client"): the canvas and the pointer listeners all live inside effects,

so SSR touches no DOM and never errors out. A browser runtime is required for actual splashes.

Related

BorderBeam · ShineBorder · GlareHover · Lens · AnimatedBeam · OrbitingCircles

Playground

Move / click mouse within this area
<div className="relative h-64 overflow-hidden rounded-xl"
     style={{ background: "oklch(0.14 0.02 255)" }}>
  <SplashCursor
    rainbow={true}
    splatRadius={56}
    splatForce={1}
    dissipation={0.92}
    opacity={1}
  />
</div>
PreviousShapeBlurDecorationNextStarBorder

On this page

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