TextPerspective Text
Perspective Text
A 3D rotating text component with interactive perspective effects, customizable rotation speed, and smooth hover transitions.
Overview
The PerspectiveText component creates an interactive 3D text effect using Framer Motion. It continuously rotates along the Y-axis and dynamically responds to mouse movements, providing a depth illusion.
The rotation speed and behavior can be customized for a more engaging user experience.
Preview
3D Perspective
Usage
Code
Examples
rotationSpeed
The rotationSpeed is used to change the Y-axis rotation speed.
Fast Rotation
Fast Rotation
Slow Rotation
Slow Rotation
reverseRotation
The reverseRotation is used to text rotate counterclockwise instead of clockwise.
Reverse Rotation
className
The className is used to custom styles using classes.
Stylized Text
Props
| Prop | Type | Default |
|---|---|---|
text | string | - |
className | string | - |
rotationSpeed | number | 4 |
reverseRotation | boolean | false |
as | ElementType<any, keyof IntrinsicElements> | "div" |