Skip to contentKino
Skip to Content

Text shimmer

Text that shows work going on, such as "Thinking…". Light moves over the words at an even pace while it loads, and they settle once at their full colour when the work ends.

npx shadcn add https://kinoui.com/r/text-shimmer.json
Share on

Examples

Ask Kino

Ledger web app · 36 projects
AO
Amara Okafor

Which issues slipped from the Q4 roadmap this week?

Kino

Thinking…

Answers cite the issues they read.

Sweep

The default. A soft band passes and the words fade towards the page under it, so it shows on text of any colour, on any surface, and keeps full colour everywhere else. A new label crossfades and starts a new pass.

Exports

Files you asked for this week
  • Q3 board report.pdfReady · 2.4 MB
  • Q4 roadmap review.pdfGenerating report…
  • Customer interviews.csvWaiting for the report
Kept for 7 days.

Glow

The band lights muted words up to the foreground. It needs text lighter than the foreground, or a --text-shimmer-highlight of your own: on foreground text it has nothing to add.

Integrations

Kino keeps these in step with Ledger
  • LinearSyncing 36 projects…
  • GitHubSynced 4 minutes ago
  • SlackSyncing #ledger-launch…

Breathe

Nothing travels: the whole line fades a little and comes back, for many rows working at once. Muted text dips below 4.5:1 for part of each breath, and under reduced motion it holds still.

Ledger docs

Production · main · 4f2a9c1
Status

Deploying…

Loading

loading={false} settles the words once at their full colour from wherever the light was, and true starts it again where it stopped.

Installation

npx shadcn@latest add https://kinoui.com/r/text-shimmer.json
Files
lib/refs.tslib/reduce-motion.tslib/resize.tslib/swap.tsxcomponents/kino/text-shimmer.tsx
Packages
@base-ui/reactclass-variance-authority

New to Kino? Installation covers what your project needs first and the @kino namespace.

API reference

Props

PropTypeDefaultDescription
childrenstringNoneThe status, such as "Thinking…".
loadingbooleantrueWhether the work is going on. When it ends, the words settle at their full colour.
variant'sweep''glow''breathe''sweep'How the light moves: a band that takes light away, one that adds it, or a breath with nothing travelling.
renderReactElement(props, state) => ReactElementNoneThe element it renders as, such as a <p>.

Data attributes

AttributeOnDescription
data-loadingTextShimmerPresent while it loads.
data-variantTextShimmerIts variant.

CSS variables

VariableSet it onDefaultDescription
--text-shimmer-spreadTextShimmer or above2emHalf the width of the band, in sweep and glow.
--text-shimmer-highlightTextShimmer or abovevar(--foreground)The colour glow lights the words up to.

Accessibility

  • It is text, read once where it sits. Put it in a role="status" region that is on the page before the text changes, so a screen reader hears each new step and the result.
  • Only one copy of the words is read and selected; the copy that carries the light is hidden from screen readers and can’t be selected.
  • At rest the words are drawn once, at their own colour. sweep dims them only under its band, and glow only brightens them.
  • Under reduced motion nothing travels: sweep and glow breathe in place and breathe holds still. In forced colours the light is off and the text takes the system colour.