Diagonal clip-path reveal for bold display typography. Text sweeps into view with an angled edge as the component enters the viewport, creating a striking editorial entrance effect.
Dependencies
Interaction Type
Scroll-triggered — text reveals via an animated diagonal clip-path polygon when the component enters the viewport. Direction and angle are configurable. Respects prefers-reduced-motion by showing text immediately.
Props
Options you can pass to customize this component.
children*The text string to reveal with a diagonal clip-path sweep.
directionDirection of the diagonal sweep. "left" sweeps from left to right, "right" sweeps from right to left. Defaults to "left".
angleAngle of the diagonal slant in degrees. Higher values create a steeper diagonal. Defaults to 12.
onceOnly animate on first viewport entry. When false, re-animates each time it scrolls into view. Defaults to true.
classNameAdditional CSS classes merged onto the wrapper element.
Installation
How to use
import { DiaText } from "@/components/ui/dia-text"
export function Hero() {
return (
<DiaText direction="left" angle={12}>
Fluid Precision
</DiaText>
)
}Source Code
Click the code icon in the top-right corner to view the source code.
License & Usage
// No code loaded.