Text Shimmer

A text component with an animated shimmer effect, perfect for indicating AI thinking or loading states

Installation

Copy and paste the following code into your project.

pnpm dlx shadcn-svelte@latest add https://svelte-ai-elements.vercel.app/p/text-shimmer.json

Examples

Basic text shimmer

Processing your request...

Analyzing data with custom styling

Custom duration and spread

Customize the animation with duration (in seconds) and spread (5-45) props.

Fast shimmer with wide spread Slow shimmer with narrow spread

Heading with shimmer effect

Component API

TextShimmer

TextShimmer

PropTypeDefaultDescription
childrenSnippet-Content to display with shimmer effect
askeyof HTMLElementTagNameMap"span"HTML element to render as
durationnumber4Animation duration in seconds
spreadnumber20Spread of shimmer highlight (5-45)
classNamestring-Additional CSS classes
...propsHTMLAttributes<HTMLElement>-All other element props are supported