Text & Typography Fancy Stable

LiquidText

Big text that liquefies along the cursor's path via a raw-WebGL fluid solver, with chromatic-aberration fringing that relaxes back over time

Preview

Installation

pnpm add fancy-ui-svelte
import { LiquidText } from 'fancy-ui-svelte'

Usage

svelte
<script lang="ts">
  import { LiquidText } from 'fancy-ui-svelte';
</script>

<LiquidText />

Examples

Basic Usage

Move the cursor across the text — it smears, then relaxes back.

Interactive Playground

Props

PropTypeDefaultDescription
text string"Liquid"Text to display
font string""Font family; empty string resolves via getComputedStyle(host).fontFamily
fontSize number0Font size in pixels; 0 auto-fits to the container width
fontWeight number | string700Font weight
lightColor string"#000000"Text color in light mode
darkColor string"#ffffff"Text color in dark mode
class string-Additional CSS classes
strength number0.5Geometric UV warp gain
radius number160Splat radius in screen pixels
forceGain number17Mouse-delta to force multiplier
dissipation number0.98Per-frame velocity decay factor
viscosity number4Jacobi viscous diffusion strength (8 iterations)
chromaticRatio number0.2Chromatic offset as a ratio of the warp
staticBelow number1024innerWidth at/below which the component renders as static DOM text (also used at mount)
interactive booleantrueWhether pointer movement drives the fluid simulation
pauseWhenHidden booleantruePause the render loop while the document is hidden