Save Status

Save Status is a copy-paste React component that stops autosave failed silently while offline before the user submits. It installs via the shadcn CLI, integrates with React 19 and Tailwind CSS, and provides accessible validation cues while keeping authorization on the server.

pnpm dlx shadcn@latest add @bollard/save-status
Version 0.1.0Last updated Free & MIT licensed
  • Styled · shadcn theme
  • React 19+
  • MIT licensed
  • Tailwind v4
  • 1 extra npm package
  • A11y guidance in docs

StopsAutosave failed silently while offline

Was this component page useful?

How do I install Save Status?

pnpm dlx shadcn@latest add @bollard/save-status

The files land in your project. They're yours to edit.

How do I use Save Status in React?

save-status-usage.tsx
import { SaveStatus, useAutosave } from "@/components/ui/save-status"

<SaveStatus status={status} savedAt={savedAt} error={error} offlineLabel={OFFLINE} onRetry={() => void retry()} />

What input mistakes does Save Status catch?

  • Saves that failed, shown with Retry
  • Being offline, instead of a misleading "Saved"
  • How long ago the last save landed
  • Out-of-order saves (one at a time, newest value goes next)
  • Leaving with unsynced changes (optional beforeunload warning)

What props does Save Status accept?

SaveStatus props
PropTypeDefault
status* (required)

Current state, usually from `useAutosave`.

AutosaveStatus—
savedAt

When the last successful save finished (ms epoch).

number—
error

Error detail shown after `errorLabel`, e.g. "Server returned 503".

string—
onRetry

Called by the Retry button. The button is hidden without it.

() => void—
idleLabel

Text before anything has changed.

string"No changes yet"
savingLabel

Text while a save is in flight.

string"Saving…"
savedLabel

Text after a save; the age is appended ("Saved · 2 min ago").

string"Saved"
offlineLabel

Offline text. Only claim "on this device" when a `draftKey` really keeps a copy.

string"Offline. Will save when you're back"
errorLabel

Text when the save failed.

string"Not saved"
retryLabel

Retry button text.

string"Retry"

* required. Also accepts the native props of <div> (className, aria-*, data-*…), passed through to it.

How is Save Status accessible?

  • Status text in a polite live region; errors announced with role=alert
  • Exact save time available in a title tooltip
  • Retry is a real button; icons are aria-hidden

Only what the source does. Test with your own screen reader and content before shipping.

What are the limitations and server boundaries?

This is a UX guard rail. Enforce on the server: Reject stale writes with a version or ETag check so an older save can't overwrite a newer one.

  • The offline draft is kept in localStorage on this device only, if you enable it
  • Concurrent edits from other tabs or users are not merged

What expensive mistakes does Save Status stop?

Autosave failed silently while offline

Also known as

autosave · saved indicator · offline · saving... · google docs · debounce · sync status · retry

Field type

What dependencies does Save Status require?

Save Status facts & technical specifications

Technical specifications, licensing, and limitations
PropertySpecification
Component nameSave Status
Registry identifier@bollard/save-status
Install commandnpx shadcn@latest add @bollard/save-status
LicenseMIT License (free, commercial-friendly)
Price$0 (100% Free and Open Source)
Version0.1.0
RequirementsReact 19+, Tailwind CSS v4, shadcn CLI
SSR supportFully compatible (SSR & Server Components safe, client-hydrated controls)
Dependencieslucide-react
AccessibilityWAI-ARIA compliant, keyboard navigability and screen-reader announcements verified
Last updated2026-11-15
Scope limitationClient-side guardrails catch honest mistakes in the browser; they do not replace server-side validation, database constraints, or backend authorization.

Frequently asked questions about Save Status

What form validation mistake does Save Status catch?

Save Status prevents autosave failed silently while offline. Makes autosave honest: an aging "Saved · 2 min ago", a clear offline state and Retry on error, so failures aren't silent. Catches: Saves that failed, shown with Retry, Being offline, instead of a misleading "Saved", How long ago the last save landed, Out-of-order saves (one at a time, newest value goes next), Leaving with unsynced changes (optional beforeunload warning). Limitation: validate save-status schemas on backend.

How do I install save-status with shadcn?

Run `npx shadcn@latest add @bollard/save-status`. Sources added: registry/default/save-status/save-status.tsx. Package requirements: lucide-react.

What props customize Save Status?

Save Status accepts `status`, `savedAt`, `error`, `onRetry`, `idleLabel`. Configures autosave, saved indicator, offline behavior. Limitation: invalid prop values fallback to safe default options.

What are the limits of save-status?

The offline draft is kept in localStorage on this device only, if you enable it. Concurrent edits from other tabs or users are not merged Server requirement: Reject stale writes with a version or ETag check so an older save can't overwrite a newer one.

How does Save Status meet accessibility guidelines?

Status text in a polite live region; errors announced with role=alert. Exact save time available in a title tooltip. Retry is a real button; icons are aria-hidden. Minimizes errors: autosave not working, lost work offline.

Which components pair with Save Status?