Glitch Liquid Text
GPU-rendered interactive typography printed on a thin liquid membrane. The cursor stretches glyphs with viscous fluid distortion, velocity-driven smear, localized RGB channel separation, subtle glitch slices, and cinematic light rays — while untouched type stays razor sharp.
Installation#
pnpm dlx shadcn@latest add @davinciui/glitch-liquid-textUsage#
API Reference#
| Prop | Type | Default |
|---|---|---|
textText rendered into the GPU texture. Supports multiline via \n. | string | "DAVINCIUI\nCOMPONENTS" |
fontFamilyFont family baked into the text texture. Ensure the font is loaded before mount for crisp results. | string | "Anton" |
fontSizeBase type size in CSS px before contain-fit scaling. | number | 220 |
fontWeightFont weight baked into the texture. | number | string | 400 |
lineHeightLine-height multiplier for multiline text. | number | 0.95 |
letterSpacingTracking in CSS px between characters. | number | 0 |
textColorGlyph color applied in the shader composite. | string | "#f5f5f5" |
backgroundColorCanvas clear color and shader background. | string | "#141414" |
distortionStrengthPeak liquid displacement around the cursor. | number | 0.42 |
distortionRadiusInteraction field radius in UV units. | number | 0.18 |
distortionDecayViscous relaxation rate once the cursor leaves. | number | 3 |
noiseStrengthAmplitude of the animated FBM ripple inside disturbed areas. | number | 0.07 |
noiseScaleSpatial frequency of the liquid noise field. | number | 2.4 |
noiseSpeedTemporal evolution speed of the noise. | number | 0.35 |
chromaticAberrationPeak RGB channel separation at distorted edges. | number | 0.012 |
glitchStrengthIntensity of sparse horizontal glitch slices (secondary effect). | number | 0.4 |
liquidStrengthTangential swirl component — higher feels more fluid, less lens-like. | number | 1.1 |
velocityInfluenceHow strongly cursor speed smears the type along motion. | number | 0.05 |
lightIntensityDirectional light-ray bloom gathered from disturbed glyph edges. | number | 0.35 |
grainStrengthFine monochromatic cinematic grain. | number | 0.025 |
cursorEnabledShow the difference-blend ring + dot cursor while hovering. | boolean | true |
cursorSizeOuter ring diameter in px. | number | 48 |
cursorColorCustom cursor color (rendered with difference blending). | string | "#ffffff" |
interactiveEnable pointer interaction. Disable for a static render. | boolean | true |
autoAnimateLow-energy wandering pointer keeps the membrane alive at idle. | boolean | true |
fitHow the text texture maps into the container. | "contain" | "cover" | "fixed" | "contain" |
asSemantic element for the screen-reader text node. | "h1" | "h2" | "h3" | "p" | "div" | "span" | "div" |
ariaLabelAccessible label override for the canvas region text. | string | — |
classNameAdditional classes. The container needs an explicit height (defaults to h-[560px]). | string | — |
Accessibility#
A visually hidden semantic element carries aria-label and the text content, while the canvas and custom cursor are aria-hidden. Interaction is pointer-only with no focus or keyboard path; the container is not focusable, so keyboard users see the static render.
Motion#
The shader distorts glyphs around the pointer, with velocity smear, noise, chromatic separation and glitch slices tuned by distortionStrength, distortionDecay, noiseSpeed and autoAnimate. prefers-reduced-motion disables autoAnimate and glitch, scales down chromatic and light intensity, and slows the shader clock, though direct hover distortion stays active.
View source
Keep in mind
Need a custom component?
I build bespoke UI components & websites tailored to your brand.

