Get Started
Components
- Alert
- Avatar
- Badge
- Breadcrumb
- Button
- Button Group
- Calendar
- Card
- Carousel
- Chart
- Checkbox
- Checkbox Group
- ComboBox
- Command
- Data Table
- Date Field
- Date Picker
- Date Range Picker
- Dialog
- Disclosure
- Disclosure Group
- Drawer
- Empty
- Field
- File Trigger
- Form
- Grid List
- Hover Card
- Input
- Input Group
- Input OTP
- Item
- Kbd
- Label
- ListBox
- Menu
- Number Field
- Pagination
- Popover
- Progress Bar
- Radio Group
- Range Calendar
- Resizable
- Search Field
- Select
- Separator
- Sheet
- Sidebar
- Skeleton
- Slider
- Sonner
- Spinner
- Switch
- Table
- Tabs
- Tag Group
- Text Field
- Textarea
- Time Field
- Toast
- Toggle Button
- Toggle Button Group
- Tooltip
- Tree
- Typography
AI Elements
Loading content...
This text has a shimmer effect while content is being generated.
import { Shimmer } from "@/components/ai-elements/shimmer"
export function ShimmerDemo() {
return (
<div className="space-y-4">
<Shimmer as="h2" className="text-2xl font-bold">
Loading content...
</Shimmer>
<Shimmer as="p">
This text has a shimmer effect while content is being generated.
</Shimmer>
</div>
)
}
Installation
CLI
Manual
pnpmnpmyarnbunpnpm dlx shadcn@latest add shimmer
Usage
import { Shimmer } from "@/components/ai-elements/shimmer"<Shimmer>Loading content...</Shimmer>Examples
Default
Loading content...
This text has a shimmer effect while content is being generated.
import { Shimmer } from "@/components/ai-elements/shimmer"
export function ShimmerDemo() {
return (
<div className="space-y-4">
<Shimmer as="h2" className="text-2xl font-bold">
Loading content...
</Shimmer>
<Shimmer as="p">
This text has a shimmer effect while content is being generated.
</Shimmer>
</div>
)
}
Custom Duration
<Shimmer duration={1}>Fast shimmer</Shimmer>
<Shimmer duration={3}>Slow shimmer</Shimmer>Custom Element
<Shimmer as="h2">Shimmer heading</Shimmer>
<Shimmer as="span">Shimmer text</Shimmer>API Reference
Shimmer
Animated text with shimmer effect.
| Prop | Type | Default | Description |
|---|---|---|---|
children | string | - | Text content to shimmer |
as | ElementType | "p" | HTML element type |
duration | number | 2 | Animation duration in seconds |
spread | number | 2 | Shimmer spread multiplier |
className | string | - | Custom CSS classes |