Documentation Index
Fetch the complete documentation index at: https://mintlify.com/AmanShakya0018/forgeui/llms.txt
Use this file to discover all available pages before exploring further.
Overview
The Text Shimmer component creates a smooth, continuous shimmer effect that glides across text using an animated gradient. The effect uses CSS gradients and motion animations to create a polished, eye-catching highlight that loops indefinitely. Use cases:- Highlighting premium features or calls-to-action
- Drawing attention to special offers or announcements
- Adding polish to headings and hero sections
- Creating visual interest in static text content
Installation
Usage
Imports
Props
The text content to apply the shimmer effect to. Must be a string value.
The HTML element to render as. Can be any valid HTML tag like
"h1", "span", "div", etc.Additional CSS classes to apply to the component. Use this for typography, sizing, and other styles.
Duration in seconds for one complete shimmer animation cycle. Lower values create faster shimmer movement.
Spread multiplier for the shimmer gradient width. The actual spread is calculated as
children.length * spread pixels. Higher values create a wider shimmer beam.Delay in seconds before the animation starts. Useful for sequencing multiple shimmer effects.
Delay in seconds between each animation loop. Creates pauses between shimmer passes.
Examples
Basic shimmer
Hero heading
Fast shimmer
Slow elegant shimmer
With pause between loops
Delayed start
Call to action
Badge with shimmer
Customization
Animation timing
Control the speed and rhythm of the shimmer:Shimmer width
Thespread prop controls the width of the shimmer gradient:
Color customization
The shimmer uses CSS custom properties that adapt to light/dark mode:- Light mode: Black shimmer (
#000) over gray base (#a1a1aa) - Dark mode: White shimmer (
#ffffff) over gray base (#71717a)
Semantic HTML
Use theas prop to render the appropriate semantic element:
The component is memoized with
React.memo for optimal performance, preventing unnecessary re-renders when parent components update.