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 Loop#
Text animation that transitions between multiple items, creating an engaging looping effect
Examples#
Text Loop Basic#
How can I assist you today?
Text Loop with custom variants and transition#
Beautiful templates for
Founders
Text Loop with onIndexChange#
You can use the onIndexChange prop to trigger a callback function when the index changes. In this example, we use it to create alternating animation directions.
A Little Lost・Arthur Russell
Installation#
npx shadcn@latest add "https://components.dylanwlim.com/c/text-loop.json"
Component API#
Text Loop#
| Prop | Type | Default | Description |
|---|---|---|---|
| children | React.ReactNode[] | The text content to be animated. | |
| className | string | Additional CSS classes for styling. | |
| interval | number | 2 | Time interval between text changes in seconds. |
| transition | Transition | Animation transition settings. Can't be more than the interval. | |
| variants | Variants | Custom animation variants. | |
| onIndexChange | (index: number) => void | Callback function that triggers when the index changes. | |
| trigger | boolean | true | Whether to trigger the animation. |
| mode | AnimatePresenceProps['mode'] | popLayout | Mode of for the AnimatePresence component. |
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