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

Ferrofluid

ferrofluid

Simulates pointer-responsive metallic ferrofluid ridges with flowing rim highlights.

Usage

Basic usage

Liquid metal ferrofluid background; the default ribbon is chart token, and the liquid level is concave at the mouse point.

Ferrofluid
tsx
<div className="relative h-56 overflow-hidden rounded-xl bg-neutral-950">
  <Ferrofluid />
  <div className="relative z-10 flex h-full items-center justify-center text-white/80">
    Ferrofluid
  </div>
</div>

Custom ribbon + flow direction

The colors array maps color bands according to height gradients, and flowDirection controls the overall drift direction of the peak ridge.

tsx
<Ferrofluid
  colors={[
    "var(--color-chart-3)",
    "var(--color-chart-1)",
    "oklch(0.78 0.2 50)",
  ]}
  flowDirection="up"
  glow={2.6}
/>

High turbulence · Sharp ridges

Increase turbulence, decrease fluidity, and increase sharpness to get sharper and clearer metal peaks and ridges.

tsx
<Ferrofluid turbulence={2.2} fluidity={0.04} sharpness={3.5} speed={0.8} />

Wallpaper level (slow speed and large scale)

Slow + Large scale + Turn off mouse interaction, suitable for silent hero background overlay copywriting.

Hulian component library

Liquid Metal · WebGL · Theme adaptive

tsx
<div className="relative h-56 overflow-hidden rounded-xl bg-neutral-950">
  <Ferrofluid speed={0.25} scale={2.4} glow={2.4} mouseInteraction={false} />
  <div className="relative z-10 flex h-full flex-col items-center justify-center gap-1">
    <p className="text-lg font-semibold text-white">Hulian Component Library</p>
    <p className="text-xs text-white/60">Liquid Metal · WebGL · Theme Adaptive</p>
  </div>
</div>

When to Use

Use it for a liquid-metal glow behind a brand hero or product page. Use Galaxy for deep-space depth, DotPattern or GridPattern for geometric texture, or Spotlight for a lightweight pointer focus. Ferrofluid is designed around flowing metallic ridges that deform under the pointer.

Import

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

Props

NameTypeDefaultDescription
colorsstring[]--color-chart-1/2/4Up to eight fluid colors mapped from low to high across the height field; accepts any CSS colors
speednumber0.5Animation-speed multiplier
scalenumber1.6Noise scale; higher values create finer texture and values below 0.05 are clamped
turbulencenumber1Turbulence intensity, 0 = nearly stationary smooth liquid surface
fluiditynumber0.1Smoothness of ridge blending; higher values look more fluid, with a lower limit of 0.001
rimWidthnumber0.2Highlight edge width
sharpnessnumber2.5Highlight gamma; higher values tighten the bright bands
shimmernumber1.5Low-light variation that creates metallic flashes
glownumber2Overall glow multiplier
flowDirection"up" | "down" | "left" | "right""down"Overall ridge-drift direction
opacitynumber1Overall opacity, range 0-1
mouseInteractionbooleantrueLets the pointer depress the liquid field and suppress bright bands
mouseStrengthnumber1Pointer influence intensity, only effective when mouseInteraction=true
mouseRadiusnumber0.35Normalized pointer influence radius
mouseDampeningnumber0.15Pointer-following damping in seconds; 0 follows immediately
dprnumbermin(dpr, 2)Upper limit of device pixel ratio, lower it to save GPU
classNamestring-Root container (or div)

Slots

SlotTypeDescription
fallbackReactNodeStatic non-WebGL content for SSR, reduced motion, or unavailable WebGL; defaults to a radial gradient

Usage Guidelines

  • OGL/WebGL renders on the client. SSR and unavailable WebGL show the radial-gradient fallback.
  • Place the root in a relative overflow-hidden container with an explicit height.
  • Metallic highlights read best against a dark background; light surfaces reduce their contrast.
  • On high-resolution displays, pass dpr={1} to reduce GPU cost. Higher turbulence and shimmer values increase fragment-shader work.

Related

DotPattern · GridPattern · StripedPattern · Spotlight · RetroGrid · Ripple

Playground

Ferrofluid
<div className="relative h-56 overflow-hidden rounded-xl"
     style={{ background: "oklch(0.13 0.02 265)" }}>
  <Ferrofluid
    speed={0.5}
    scale={1.6}
    glow={2}
    flowDirection="down"
    mouseInteraction={true}
  />
</div>
PreviousFaultyTerminalDecorationNextFloatingLines

On this page

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