Shimmer
An animated text shimmer component for creating eye-catching loading states and progressive reveal effects.
The Shimmer component provides an animated shimmer effect that sweeps across text, perfect for indicating loading states, progressive reveals, or drawing attention to dynamic content in AI applications.
Install using CLI
Install Manually
Copy and paste the following code in the same folder.
Features
- Smooth animated shimmer effect using CSS gradients and Motion
- Customizable animation duration and spread
- Polymorphic component - render as any HTML element via the
aspropAutomatic spread calculation based on text length - Automatic spread calculation based on text length
- Theme-aware styling using CSS custom properties
- Infinite looping animation with linear easing
- TypeScript support with proper type definitions
- Memoized for optimal performance
- Responsive and accessible design
- Uses
text-transparentwith background-clip for crisp text rendering
Examples
Different Durations
Custom Elements
Props
<Shimmer />
askeyof HTMLElementTagNameMap
'p'classstring
''durationnumber
2spreadnumber
2