Skip to content
EspañolEnglish
All components (244)

Service deadline

Management · SLAIndicator

What it is and when to use it

How much is left of a service deadline (SLA), with the bar of what is spent and the phase written out: on time, due soon, overdue, paused, met or missed.

When to use it

  • The first response to a customer, the resolution of an incident, the deadline of an approval.
  • startedAt and dueAt are the start and the deadline. It warns when warnRatio of the deadline is left (a quarter by default).
  • pausedAt for a deadline that stops (waiting for the customer, outside working hours): time stops running at that instant.
  • completedAt once it has been handled: the deadline is left as met or missed, with the margin or the delay.
  • now sets the "now" by hand; without it, the browser clock, which goes up by minutes.

When not to

  • A countdown in seconds: Countdown.
  • The progress of a task: Progress.
  • It decides nothing on its own: warning the team or escalating an overdue deadline is done by the server.

Keyboard: it has no controls; it is a named progress bar.

Accessibility: the phase is written out ("Due soon: 1 h 30 min left"), so colour is not the only thing that informs, and it is the value of the bar for the screen reader. On the server the time is not painted, so the HTML does not carry an hour that is no longer valid.

Fine appearance: the bar is that of Progress; the tone changes with the phase. An overdue or missed deadline puts the text in the error tone.

What it looks like

Reply to the customerOn time: 8h left
Ship the orderDue soon: 2h left
Resolve the incidentOverdue: 1d 3h ago
Return processedMet: 1d to spare

<SLAIndicator
  label="Reply to the customer"
  startedAt="2026-10-31T08:00:00Z"
  dueAt="2026-10-31T20:00:00Z"
/>
<SLAIndicator
  label="Return processed"
  startedAt={inicio}
  dueAt={limite}
  completedAt={cierre}
  size="sm"
/>

Props

Import it with import { SLAIndicator } from '@amset/ui'. Required props are marked.

PropTypeWhat it does
dueAtrequiredSlaMomentWhen it is due.
labelrequiredstringWhich deadline it is («First response to the customer»). Required.
startedAtrequiredSlaMomentWhen the deadline started counting.
classNamestringMerged with the library classes; it does not replace them.
completedAtSlaMomentIf it has already been handled, when: the deadline is left as met or missed depending on whether it arrives before or after `dueAt`.
nowDateThe instant taken as "now". Without it, the browser clock, which goes up by minutes.
pausedAtSlaMomentIf the clock has been stopped since this instant (waiting for the customer, outside working hours): time stops running.
size"sm" | "md"—
warnRationumberHow much of the deadline has to be left at most to warn. 0.25 by default.

It also accepts the attributes of the element it renders: className, style, data-*, aria-* and its events.

In the test bench

Every state and variant, to try one at a time, on its page at ui.amset.tech: