3D Displacement Text
A mesmerizing 3D text effect with fluid displacement that follows your cursor. Built with Three.js and WebGL shaders.
Install using CLI
npx shadcn@latest add "https://vengeance-ui.vercel.app/r/liquid-text.json"Install Manually
1
Install dependencies
2
Add Three.js types (for TypeScript)
3
Add util file
lib/utils.ts
4
Copy the source code
Copy the code below and paste it into components/ui/liquid-text.tsx
Usage
Examples
Custom Colors
Theme Aware
Custom Font
Props
| Prop Name | Type | Default | Description |
|---|---|---|---|
| text | string | "Liquid Text" | The text to display. |
| fontSize | number | 200 | Font size in pixels. |
| font | string | "Inter, sans-serif" | Font family to use. |
| color | string | - | Fixed text color (overrides theme colors). |
| lightColor | string | "#000000" | Text color in light mode. |
| darkColor | string | "#ffffff" | Text color in dark mode. |
| className | string | "" | Additional CSS classes. |
Features
3D Displacement Effect: Text warps and bends following your cursor
WebGL Powered: Smooth 60fps animations using Three.js
Theme Aware: Automatically adapts to light/dark mode
Custom Colors: Use fixed colors or theme-responsive colors
Responsive: Adjusts to container size changes
Performant: Proper cleanup and memory management