Text Effects
Typography effect components for adding shimmer, highlight, gradient, and color effects to text.
Loading...
Installation
pnpm add @corew500/uiUsage
import { Shimmer, Highlight, Gradient, ColoredText } from '@corew500/ui/text-effects'
// Shimmer animation
<h1>Build products <Shimmer color="primary">10x faster</Shimmer></h1>
// Highlight background
<h1>With <Highlight color="accent">beautiful components</Highlight></h1>
// Gradient text
<h1>Design with <Gradient>elegant precision</Gradient></h1>
// Colored text
<h1>Built for <ColoredText color="primary">modern teams</ColoredText></h1>Available Effects
| Component | Description |
|-----------|-------------|
| Shimmer | Animated shimmer/shine effect |
| Highlight | Subtle background highlight |
| Gradient | Animated gradient text color |
| ColoredText | Static semantic color |
| ShimmerGroup | Multiple words with offset shimmer |
| HighlightGroup | Multiple words with highlights |
API Reference
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| color | enum | primary | The color of the shimmer highlight. |
| textColor | enum | foreground | The base color of the text. |
| duration | number | 2 | Animation duration in seconds. |
| delay | number | 0 | Animation delay in seconds. Used to offset the start time for creating sequential effects. |
| className | string | — | Additional CSS classes |
Accessibility
Screen Readers
- Text remains readable by screen readers
Additional
- - Decorative effect that doesn't affect content meaning
- Consider reduced motion preferences for users sensitive to animation
Localization
Translatable Content
- - Pass pre-translated text as children
Additional
- Effect is purely visual and language-agnostic
Related
Related Components
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| color | enum | primary | The color of the highlight background. |
| className | string | — | Additional CSS classes |
Accessibility
Screen Readers
- Text remains readable by screen readers
Additional
- - Decorative effect that doesn't affect content meaning
- Consider reduced motion preferences for users sensitive to animation
Localization
Translatable Content
- - Pass pre-translated text as children
Additional
- Effect is purely visual and language-agnostic
Related
Related Components
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| className | string | — | Additional CSS classes |
Accessibility
Screen Readers
- Text remains readable by screen readers
Additional
- - Decorative effect that doesn't affect content meaning
- Consider reduced motion preferences for users sensitive to animation
Localization
Translatable Content
- - Pass pre-translated text as children
Additional
- Effect is purely visual and language-agnostic
Related
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| color | enum | primary | The color to apply to the text. |
| className | string | — | Additional CSS classes |
Accessibility
Screen Readers
- Text remains readable by screen readers
Additional
- - Decorative effect that doesn't affect content meaning
- Consider reduced motion preferences for users sensitive to animation
Localization
Translatable Content
- - Pass pre-translated text as children
Additional
- Effect is purely visual and language-agnostic