Skip to content
English

How it works

All four glyphs live in one slot and cross-fade with a slight spring, so the indicator never shifts. Text changes slide vertically inside a box whose width is measured and eased, and the tone colour mixes the surface, border and icon from one value.

Use it for

  • Editors and forms that save automatically.
  • Apps that keep working offline and sync later.

Look elsewhere when

  • Forms with an explicit Save button: show feedback on that button.
  • Errors that block work: use a callout.

Usage

import { SaveStatus } from './SaveStatus.jsx'

export function EditorHeader({ status, savedAt, retry }) {
  // status: 'idle' | 'saving' | 'saved' | 'offline' | 'error'
  return <SaveStatus status={status} savedAt={savedAt} onRetry={retry} />
}

Props

PropTypeDefaultWhat it does
status'idle' | 'saving' | 'saved' | 'offline' | 'error''idle'The current state; saved relaxes into idle after settle ms.
savedAtstring—Appended to the idle label, such as “2 min ago”.
onRetry() => void—Shows a Retry button in the error state.
labelsobject—Replaces idle, saving, saved, offline, error and retry text.
variant'pill' | 'inline''pill'Tinted pill, or plain icon and text.
settlenumber2400Ms before Saved becomes the quiet idle label; 0 keeps it.

Accessibility

  • The icon and label sit in a polite role status region, so each new state is announced once; the outgoing label is aria-hidden.
  • Each state has its own icon shape and text, not colour alone.
  • Retry is a real button, 32px high, with a focus ring.
  • With reduced motion labels fade instead of sliding, the width snaps and the arc turns slowly.

Motion

Label slides 320ms ease-out (old one 220ms); width 320ms; icons cross-fade with a 320ms spring; check stroke draws in 360ms; arc turns every 900ms.

Add it to your project

Copy the prompt into Codex or Claude Code. The agent reads the published source, shows you what it will write and adds the component next to your own.

SaveStatus.jsxsave-status.csstokens.cssREADME.md

Both files install together. The stylesheet reads the design tokens in tokens.css and carries fallbacks, so it also works alone.

Feedback
Confetti burst comes with Pro. Its preview shows once you unlock it.