GitHub

Text Effects

Typography effect components for adding shimmer, highlight, gradient, and color effects to text.

Loading...

Installation

pnpm add @corew500/ui

Usage

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

PropTypeDefaultDescription
colorenumprimaryThe color of the shimmer highlight.
textColorenumforegroundThe base color of the text.
durationnumber2Animation duration in seconds.
delaynumber0Animation delay in seconds. Used to offset the start time for creating sequential effects.
classNamestringAdditional 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

PropTypeDefaultDescription
colorenumprimaryThe color of the highlight background.
classNamestringAdditional 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

Props

PropTypeDefaultDescription
classNamestringAdditional 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

Props

PropTypeDefaultDescription
colorenumprimaryThe color to apply to the text.
classNamestringAdditional 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