TextShimmer

Looping gradient sweep over text. CSS-only — animates the background-position of a 3× linear gradient clipped to the text via background-clip: text. Use it for "loading…" labels, headline accent, skeleton text states.

Ship the boogie.

npx bwo-ui add text-shimmer

Usage

import { TextShimmer } from '@bwo-ui/react';

<TextShimmer as="h2" color="var(--bwo-text)" highlight="#ff481f">
  Ship the boogie.
</TextShimmer>

// Slower, narrower band
<TextShimmer duration={3.2} bandWidth={20}>Loading…</TextShimmer>

Props

PropTypeDefaultDescription
asElementType'span'Tag to render.
colorstring'currentColor'Base text colour.
highlightstring'#ffffff'Sweeping highlight colour.
durationnumber1.8Sweep duration in seconds.
bandWidthnumber40Width of the highlight band as %.
delaynumber0Delay before the first sweep starts.
pausedbooleanfalsePause the animation.