Core Components
Number Effects
Interactive Elements
Advanced Effects
Radix UI Components
- Accordion
- Alert
- Alert Dialog
- Aspect Ratio
- Avatar
- Badge
- Breadcrumb
- Button
- Button Group
- Calendar
- Card
- Carousel
- Chart
- Checkbox
- Collapsible
- Combobox
- Command
- Context Menu
- Data Table
- Date Picker
- Dialog
- Direction
- Drawer
- Dropdown Menu
- Empty
- Field
- Hover Card
- Input
- Input Group
- Input OTP
- Item
- Kbd
- Label
- Menubar
- Native Select
- Navigation Menu
- Pagination
- Popover
- Progress
- Radio Group
- Resizable
- Scroll Area
- Select
- Separator
- Sheet
- Sidebar
- Skeleton
- Slider
- Sonner
- Spinner
- Switch
- Table
- Tabs
- Textarea
- Toast
- Toggle
- Toggle Group
- Tooltip
- Typography
Base UI Components
- Accordion
- Alert
- Alert Dialog
- Aspect Ratio
- Avatar
- Badge
- Breadcrumb
- Button
- Button Group
- Calendar
- Card
- Carousel
- Chart
- Checkbox
- Collapsible
- Combobox
- Command
- Context Menu
- Data Table
- Date Picker
- Dialog
- Direction
- Drawer
- Dropdown Menu
- Empty
- Field
- Hover Card
- Input
- Input Group
- Input OTP
- Item
- Kbd
- Label
- Menubar
- Native Select
- Navigation Menu
- Pagination
- Popover
- Progress
- Radio Group
- Resizable
- Scroll Area
- Select
- Separator
- Sheet
- Sidebar
- Skeleton
- Slider
- Sonner
- Spinner
- Switch
- Table
- Tabs
- Textarea
- Toast
- Toggle
- Toggle Group
- Tooltip
- Typography
Text Effect#
Easily animate text content with various effects. You can apply animations per character or per word, and customize the animation effects using custom variants or preset animations.
Examples#
Text Effect per character#
Animate your ideas with componentsAnimate your ideas with components
Text Effect per word#
Animate your ideas with componentsAnimate your ideas with components
Text Effect with preset#
Animate your ideas with componentsAnimate your ideas with components
Text Effect with custom variants#
Animate your ideas with componentsAnimate your ideas with components
Text Effect with custom delay#
Animate your ideasAnimate your ideas
with componentswith components
(and delay!)(and delay!)
Text Effect per line#
now live on components!now live on components!now live on components!
Text Effect with exit animation#
Animate your ideas with componentsAnimate your ideas with components
Text Effect with speed#
You can control the speed of the animation by using the speedReveal and speedSegment props.
Animate your ideas with components.Animate your ideas with components.
Installation#
npx shadcn@latest add "https://components.dylanwlim.com/c/text-effect.json"
Component API#
TextEffect#
| Prop | Type | Default | Description |
|---|---|---|---|
| children | string | The text content to be animated. | |
| per | 'word' | 'char' | 'line' | 'word' | Defines whether animation applies per word, character, or line. |
| as | keyof JSX.IntrinsicElements | 'p' | The HTML tag to render, defaults to paragraph. |
| variants | { container?: Variants; item?: Variants; } | undefined | Custom variants for container and item animations. |
| className | string | undefined | Optional CSS class for styling the component. |
| preset | 'blur-sm' | 'fade-in-blur' | 'scale' | 'fade' | 'slide' | 'fade' | Preset animations to apply to the text. |
| delay | number | 0 | Delay before the animation starts. |
| trigger | boolean | true | Controls whether the animation should be triggered. |
| onAnimationComplete | () => void | undefined | Callback function when the animation completes. |
| onAnimationStart | () => void | undefined | Callback function when the animation starts. |
| segmentWrapperClassName | string | undefined | Optional CSS class for styling segment wrappers. |
| style | CSSProperties | undefined | Optional inline styles for the component. |
| containerTransition | Transition | undefined | Optional transition for the container. |
| segmentTransition | Transition | undefined | Optional transition for the segments. |
| speedReveal | number | 1 | Controls the speed of the reveal animation. |
| speedSegment | number | 1 | Controls the speed of the animation. |
Build with DWL Components
Use the copied registry, charts, blocks, and create tools in one place.
Start from the DWL Components create flow and customize from there.
Open DWL Components Create