Back to Components
bash
npm install @hua-labs/huatsx
import { TextReveal } from "@hua-labs/ui/advanced";Default gradient mask reveal
Pro
Experience the future of web design with stunning visual effects and smooth animations.
Text reveals word by word
Build amazing products with our modern platform
Text reveals character by character
Typing effect simulation
Custom reveal and hidden colors
Blue accent reveal effect
Emerald accent reveal effect
Rose accent reveal effect
text* | string | - | Text to display |
revealColor | string | "currentColor" | Color of revealed text |
hiddenColor | string | "rgba(128, 128, 128, 0.3)" | Color of hidden text |
threshold | number | 0.5 | Reveal threshold (0-1) |
byWord | boolean | false | Reveal word by word |
byChar | boolean | false | Reveal character by character |
docs:common.basicUsagetsx
import { TextReveal } from '@hua-labs/ui/advanced';
<TextReveal
text="Welcome to the future of design"
className="text-4xl font-bold"
/>docs:components.textReveal.examples.byWordtsx
<TextReveal
text="Build amazing products with our platform"
byWord
revealColor="#3b82f6"
className="text-3xl font-semibold"
/>docs:components.textReveal.examples.byChartsx
<TextReveal
text="Character by character reveal"
byChar
revealColor="#10b981"
className="text-2xl font-mono"
/>- •Reduced Motion: When prefers-reduced-motion is set, text is fully revealed immediately
- •Screen Reader: Full text is always accessible to screen readers