SaveIndicator

The status beside a field that saves as the person types: saving, saved at a time, or retrying after a failed save. An icon and words, so the warning state doesn't rely on colour.

Spec · from metadata

When to use

  • •A field that saves itself as the person types, with nothing to commit: visit notes, a long free-text answer, a draft
  • •Any autosaving surface where losing the last few sentences would hurt, so the person needs to see that they are safe

When not to use

  • •A form with a Save button — the button and a success toast already say it saved
  • •Saving that has stopped for good — take the indicator away and show a warning Alert that says what to do
  • •Settings toggles that apply at once — the control's own state is the confirmation

Anti-patterns

Avoid<span className="text-muted-foreground">Saved</span>
Prefer<SaveIndicator status="saved" savedAt={savedAt} />

Plain text gives no time, so the person can't tell whether their last sentence is safe, and a screen reader is never told the save happened.

Avoid{failed && <SaveIndicator status="retrying" />}  // forever
Prefer{failed ? <Alert variant="warning">…copy your notes, then reload</Alert> : <SaveIndicator … />}

A status line is too quiet for words that are about to be lost. Once retries stop, the person has to act, and an Alert says what to do.

Accessibility

  • Required ARIArole="status" (built in)
  • Screen readerOne polite status for the field's life. "Saved at 2:41 PM" and "Unsaved changes — retrying" are read when they arrive; "Saving…" is hidden from it, so a save on every pause in typing doesn't talk over the person. Icons are aria-hidden: the words carry the meaning.

Token bindings

TokenCategoryUsage
text-muted-foregroundcolorSaving and saved
text-foregroundcolorRetrying, so it reads above the muted states
text-tc-orange-700colorRetrying icon, as Alert's warning icon (dark: tc-orange-400)
text-smtypographyIndicator text
Recent changes
  • new

    SaveIndicator, a record's avatar, and the help button

    2026-11-05

[!NOTE] Compound component — an opinionated composition of Helix primitives.

Import

import { SaveIndicator } from "@timelycare/helix-ui"

Usage

<Field>
  <div className="flex items-center gap-3">
    <FieldLabel htmlFor="visit-notes">Visit notes</FieldLabel>
    {status && <SaveIndicator status={status} savedAt={savedAt} />}
  </div>
  <Textarea id="visit-notes" value={notes} onChange={onNotesChange} />
</Field>

Save after a pause in typing, about a second, and set status to "saving", then "saved" with the time it landed. "Saved at 2:41 PM" answers the question the person actually has, which is whether the last thing they typed is safe. A bare "Saved" looks the same a second later or ten minutes later.

If a save fails, set "retrying" while you try again: a warning icon and "Unsaved changes — retrying", in full-strength text so it stands out from the muted states. If saving stops for good, take the indicator away and put a warning Alert above the field:

<Alert variant="warning">
  <TriangleAlert />
  <AlertDescription>
    Autosave has stopped and your recent changes aren't saved. Copy your notes somewhere safe, then reload the visit.
  </AlertDescription>
</Alert>

The indicator is a polite live region, so mount it at the first save and only change status after that. "Saved at …" and "Unsaved changes — retrying" are read out; "Saving…" is not, so a save on every pause doesn't talk over someone who is still typing.

TimelyCare Design System

v0.14.0