Documentation3D Displacement Text

3D Displacement Text

An interactive WebGL text effect with 3D displacement that responds to mouse movement. Creates a liquid, morphing effect on the text.

Install using CLI

npx shadcn@latest add "https://obsidianui.dev/r/liquid-text.json"

Install Manually

1

Install dependencies

npm install three clsx tailwind-merge
2

Copy the source code

Copy into components/ui/liquid-text.tsx

Note: This component uses Three.js for WebGL rendering. Install via CLI for the full shader implementation.

Props

Prop NameTypeDefaultDescription
textstring'Liquid Text'Text to display
fontSizenumber200Font size in pixels
fontstring'Inter, sans-serif'Font family
colorstring-Fixed text color
lightColorstring'#000000'Light mode color
darkColorstring'#ffffff'Dark mode color
classNamestring-Additional CSS classes