Skip to the page
Tactile UI

Progress toast

A toast that carries a job running in the background, an export, an import or a sync, from its start to its end. The toast’s plate holds a lamp, the job in words, the progress groove filling with ink, the count, the percent and the time left, and a Cancel key. When the job ends the same plate says how it went: done, with an action key such as Open, and gone after six seconds; failed, with Retry, staying until it is closed; or cancelled. A job of unknown size runs a short length of ink to and fro. Nothing takes focus, and only the start and the end are said aloud. For agent dashboards the same plate comes as an agent toast: a small lit instrument at the left in place of an icon (a lamp per test suite, two lines joining for a merge, a dot chain lit to the current deploy step, two bars for this build against the usual, an amber context meter with a Compact key), stacked so that it fans closed and opens on hover or focus.

On this page
  1. Anatomy
  2. Variants
  3. States
  4. Props and options
  5. Usage notes
  6. Accessibility
  7. Related parts

Anatomy

The plate is the toast’s, with the panel’s grain. The groove is the kit’s progress slot filling with ink; the lamp is the kit’s, amber and blinking while the job runs, green, red or unlit when it ends. The keys are the kit’s small keys and the close key the icon set’s cross. Sizes are printed by the file field’s own sizes. No colour is added.

Variants

  • Agent · tests passed
  • Agent · a suite failed, stays
  • Agent · PR merged
  • Agent · deploy at step 3
  • Agent · build against the usual
  • Agent · context, with Compact
  • A count
  • Sizes
  • Size unknown · no total
  • Done, with an action
  • Failed, with Retry
  • No Cancel key · no cancel()

States

  • Running
  • Size unknown
  • Done
  • Failed
  • Cancelled

Props and options

NameKindDescription
progressToast(options)functionShows a plate for a job and returns its handle.
text · value · total · unitoptionThe job in words, how far it has got and how big it is.
cancel · cancelledoptionCalled when Cancel is pressed (without it there is no Cancel key), and the words then.
eta · intooptionWhether to print the time left, worked out from the pace so far once there is enough of it; and an element to stack in (position: relative).
cancel() · dismiss()methodCancel the job as the key does, or take the plate away.
state · value · total · text · platepropertyWhere the job stands, and the plate itself.
progressFraction() · progressCount() · progressPercent() · progressEta() · progressEtaText() · progressValueText()functionThe sums and words behind the plate.
agentToastModel() · agentToastHTML() · agentInstrumentHTML() · agentToastLayout()functionWhat a toast says and how it is lit, one toast as markup, and where each card of the stack goes.
agentLamps() · agentDots() · agentSegments() · agentDuration() · agentBuildDelta()functionThe lamps, dots and segments an instrument lights, and the words for a time and for this build against the usual.
progressToastHTML()functionOne plate as markup in a state, for a specimen or a page drawn on the server.

Usage notes

Press Export 3 files: a plate rises and the groove fills a file at a time; Open appears when it is done. Sync the library has no size, so its ink runs to and fro. Cancel works while a job runs.

Accessibility

  • Only the start and the end are said, in one polite status line shared by the stack; a failure is said in an alert. The percent is never read out as it climbs.
  • A plate never takes focus. Its keys are real buttons in the page’s tab order, named in words (Cancel, Open, Retry, and a close key named “Close:” and the job). Escape closes a finished plate that focus is in, and focus goes back where it came from.
  • A finished plate’s clock stops while the pointer is on it or focus is in it; a failed one stays until it is closed, because an error should not leave before it has been read.
  • The lamp is never alone: the words say done, failed or cancelled. Under reduced motion the plate does not rise, the lamp does not blink, and a job of unknown size is a still, hatched groove.
  • Agent toasts: each card is a group named by its words, and the instrument is hidden from a screen reader because the title and the line under it say the same (“Tests failed”, “3 of 8 suites: auth, ui”). Nothing takes focus.
  • The stack opens when focus is inside it as well as on hover, so every key on every card can be reached by Tab; Escape closes the card that focus is in, and focus goes to the next card. A failure and a running deploy stay until someone acts. The clock of the others stops while the stack is open. Where there is no hover, a tap on a card opens the stack and another closes it.
  • The instrument is never the only signal: lamps are green or red and the failed suites are named, the build bars are labelled by the line under them, and the dots by the step named. Under reduced motion the cards do not rise, the stack opens and closes at once, and the current dot does not blink.

Toast

A confirmation after an action.

Ticket toast

A toast issued like a numbered ticket from a dispenser. A short slip of thermal paper with a number, a line of words and, if it needs one, an action key slides out of a slot at the edge of the screen. Several fan a little. Tear one off with a swipe or its close key, or leave it and it retracts by itself, on a timer that stops while you are reading it.

Progress

Progress through a task: ink filling a groove, never a coloured bar.

Spinner

A ring of eight lamps lit in turn, a chase round a dial: each lamp is a dim cap with its light laid over it, and the light fades as the chase passes on, leaving a short tail. Only the light’s opacity moves. Amber, the lamp for work in hand. Under reduced motion it holds still on one lit lamp at the top, and the words still say it is busy.

Loading overlay

A pane of smoked glass laid over a panel while it works. The panel underneath keeps every pixel of its place, dimmed and a little out of focus, with one plate in the middle carrying a spinner and a line of words. Set aria-busy on the panel to lower the glass; what is underneath goes inert, so nothing in it can be pressed or tabbed to until the glass lifts.