Components · Feedback & status

Alert Banner

A persistent, priority-ranked message that tells a clinician what has changed, how urgent it is, and what to do next — without taking over the screen.

Stable · v1.0 shadcn/ui IEC 60601-1-8 WCAG 2.2 AA
Reference application

AcuteLine is a fictional SaMD used as the worked example across this system. It ingests 12-lead and continuous ECG plus high-sensitivity troponin results and flags patients with suspected acute coronary syndrome (ACS) for clinician review. It is decision support: it never diagnoses, never triggers therapy, and every output is confirmed by a qualified clinician. All screens, copy and patient data are fabricated.

Overview

An Alert Banner occupies a fixed region of the layout and stays there until the underlying condition resolves or a clinician acts on it. It is the workhorse for communicating change in a SaMD: a new detection, a degraded input, a failed analysis, a completed action.

In AcuteLine it carries the moment that matters most — the transition from "ECG received" to "this patient may be having a STEMI." That transition has to survive a noisy resuscitation bay, a clinician looking at a different monitor, and a screen three metres away.

When to use

When not to use

Design principles

Unambiguous

Priority, patient and finding must be readable in one glance, from across the room, by someone mid-task. If a clinician has to read it twice, the banner has failed.

Proportionate

Visual force matches clinical consequence — never engagement value. Every banner promoted above its true priority spends attention the next real alarm will need.

Actionable

State the next step and put the control to take it inside the banner. An alert that reports a problem but leaves the clinician hunting has moved work, not removed it.

Anatomy

priority: critical · variant: docked
1 2 3 4 5 6 7
1Priority fill. Carries the IEC colour — the only element allowed to encode priority chromatically, always paired with 2 and 3.
2Priority glyph. Redundant non-colour encoding for colour-vision deficiency and greyscale output.
3Title. The finding in clinical language. One line, ≤ 60 characters, most specific term first.
4Provenance. Patient, acquisition time, model version, confidence. Required on every algorithm-derived alert.
5Occurrence count. Only when identical alerts coalesce. Never hides the most recent instance.
6Primary action. Goes to the evidence — never straight to an irreversible step.
7Acknowledge. Critical and Urgent only. Records who acknowledged and when.

Priority levels

Four priority levels plus one confirmation level. The first three map onto IEC 60601-1-8 alarm priorities and inherit that standard's mandated hues. These are not brand decisions and must not be re-themed — see Colour.

LevelIECMeansAcuteLine exampleToken
criticalHighImmediate response required STEMI pattern detected --alarm-critical
urgentMediumPrompt response required hs-troponin rising on 0/1 h algorithm --alarm-urgent
advisoryLowAwareness; can wait Lead V3 signal quality degraded --alarm-advisory
infoNot an alarmState change, no response Analysis complete — no acute pattern --alarm-info
confirmationNot an alarmA clinician action succeeded Cath lab notified at 14:32 --alarm-ok
All five levels · variant: docked
Lead V3 signal quality degraded
Anterior interpretation may be limited. Re-apply the electrode and re-acquire.
HARLAND, A. · MRN 44812907 · 14:27:11
Analysis complete — no acute ischaemic pattern detected
A negative result does not exclude ACS. Continue clinical assessment.
VASQUEZ, R. · MRN 62907415 · 14:44:20 · model v4.2
Cath lab notified at 14:32
Sent by S. Whitfield · acknowledged by cath lab 14:33

Physiological and technical alarm conditions

Priority says how urgently. It does not say what kind of thing is wrong, and IEC 60601-1-8 separates two kinds that this page had been rendering identically.

KindArises from What it actually tells the clinician
Physiological A monitored patient variable Something about the patient has changed. The system is working and is telling you what it found.
Technical The device, a sensor, a connection, a source system The system can no longer tell you about the patient. Not a finding — the absence of one.
A worked example from this page

The advisory in the demo above reads "Lead V3 signal quality degraded — anterior interpretation may be limited." That is a technical alarm condition wearing the same banner as the two physiological ones beside it, with nothing to say so.

A clinician scanning a stack of banners cannot tell "this patient is deteriorating" from "we have stopped being able to see this patient" — and the second is easy to read as a nuisance precisely because nothing about the patient has changed yet.

What follows

The same priority, two different kinds
hs-troponin rising — NSTEMI cannot be excluded
14 → 47 ng/L across the 0/1 h interval.
Physiological · OKONKWO, B. · 14:41:02
Technical — ECG telemetry lost
This patient is not being monitored. Absence of further alarms does not mean absence of events. Re-establish telemetry or move to continuous observation.
Technical · HARLAND, A. · since 14:38:09

Messages about the software

A third category sits outside both: the application reporting on itself. A failed export, an unreachable directory, a session about to expire. These are not alarm conditions and never take an alarm hue, however severe they feel to the person who built them.

The headline

Variants

docked

Full-bleed, solid fill, pinned beneath the patient header. The only variant permitted for critical. Use when the alert concerns the whole record in view.

inline

Scoped to a card or panel: surface drops to --card and priority moves to a 4 px rail. Use when the alert concerns one region — a single lead, one lab panel, one chart. The lower chroma is deliberate; an inline alert must not out-shout a docked one on the same screen.

variant: inline
Serial comparison unavailable
No prior ECG on file. Change from baseline cannot be assessed.
Paced rhythm detected
ST-segment criteria are not validated in ventricular pacing. Interpret with caution.

compact

Single line, no description or provenance. Permitted only inside dense repeating structures such as a triage worklist, and only when the full alert is one click away.

variant: compact · worklist rows
STEMI · anterior · HARLAND, A. · 14:26
Troponin rising · OKONKWO, B. · 14:41

States & behaviour

StateAppearanceRules
activeFull priority chroma Entry 220 ms ease-out. Never re-animate on re-render.
acknowledged (timed)Chroma drops to rail; countdown shown Returns to active automatically when the timer lapses if the condition persists.
acknowledged (indefinite)Chroma drops to rail Persists until resolved. Writes user and timestamp to the audit log.
audio-pausedVisually unchanged; separate audio indicator Pausing audio must never alter or hide the visual signal.
latchedFull chroma retained Condition resolved but was never seen. Stays until acknowledged.
resolvedRemoved, or replaced by a confirmation Critical alerts are never removed silently — always leave an event-log trace.
active → acknowledged
STEMI pattern detected — anterior leads V2–V4
acknowledged by S. Whitfield 14:27:04 · re-alerts in 09:12

Stacking and coalescence

Writing the message

Alert copy is a safety surface. Write for a reader who is interrupted, tired, reading at distance, and about to make a decision.

Do
STEMI pattern detected — anterior leads V2–V4
ST elevation 3.1 mm. Confirm ECG and activate local chest-pain pathway.

Names the finding, the territory and the measurement, then hands the decision back to the clinician.

Don't
Alert! AcuteLine has diagnosed a heart attack.
Please review the patient as soon as possible.

Claims a diagnosis the software is not cleared to make, leads with the product name, and gives no territory, measurement or action.

What the component enforces, and what it only asks for

This is the page where the difference matters most, because the component renders an alarm and almost none of what makes an alarm system safe happens inside a renderer. It has no state, no timer and no knowledge of the condition it is displaying.

RuleHeld by How
Priority is one of the IEC 60601-1-8 codingsThe component priority is a union of five values. A severity outside the standard's coding is not expressible.
Asserted: AlertBanner: priority is a closed set, so a sixth severity is unwritable
An alarm always carries a statementThe component title is required, so a banner that signals without saying anything cannot be built.
Asserted: AlertBanner: an alarm cannot be raised without a statement
Physiological and technical are distinguishedThe component kind renders the distinction, so a lead-off is not read as a patient deteriorating.
Asserted: AlertBanner: a technical condition says so in words
Acknowledgement records who and whenThe component acknowledgedBy takes a name and a time, and renders both.
Asserted: AlertBanner: acknowledged state names the person, and the control goes
Colour is never the only carrierThe component Priority renders as a word and a fill together; there is no colour-only mode.
Asserted: AlertBanner: priority is in text, not only in colour
An alarm condition is announced at once, and nothing at any priority can be dismissedThe component A critical or urgent condition renders as an aria-live="assertive" region; there is no dismiss control in the props, so the only way off the screen is acknowledgement or resolution.
Asserted: AlertBanner: a critical condition is an assertive live region, and has no dismiss
Acknowledging does not throw focus awayThe component The control is removed once pressed, and focus moves to the acknowledgement that replaces it. It went to <body>: a keyboard user who had just acknowledged an alarm was left at the top of the document. Driven in a browser.
Asserted: AlertBanner: acknowledging by keyboard leaves focus on the acknowledgement
An acknowledged alarm re-asserts if the condition persistsYou There is no timer here. onAcknowledge tells you it happened; whether the condition is still true, and what to do about it, is your alarm system's job.
Escalation after an unattended intervalYou Also a timer, also yours. The component cannot know the interval or that nobody attended.
The banner is never covered, and never scrolls awayYou That is a layout decision — see Grid & layout. Putting this inside a scrolling container defeats every rule on this page and nothing here can detect it.
Alarms are not raised faster than a person can act on themYou Rate is a property of your alarm logic. A renderer will draw whatever it is handed, including a queue that trains a clinician to dismiss without reading.
An audible signal accompanies critical and urgent conditionsYou This package emits no sound at all — see Auditory alarms.
Why this is written down

A rule stated on a component page reads as a rule the component keeps. 5 of these 10 are; 5 are obligations this page was quietly handing to the reader. Five of the ten are the alarm system's, not this component's, and they include re-assertion, escalation and rate — the three that IEC 60601-1-8 actually turns on. This page renders alarms; it does not manage them.

Do's and don'ts

Do
Lead V3 signal quality degraded
Anterior interpretation may be limited.

Match the level to the consequence. A recoverable input problem is advisory.

Don't
Lead V3 signal quality degraded
Anterior interpretation may be limited.

Inflating an electrode problem to critical trains clinicians to discount red — the definition of alarm fatigue.

Do
Analysis complete — no acute ischaemic pattern
A negative result does not exclude ACS. Continue clinical assessment.

State the limits of a negative result in the banner itself.

Don't
Patient is clear — no heart attack

Reads as an all-clear the software cannot give, and invites premature discharge.

Do
STEMI pattern detected — anterior leads V2–V4
HARLAND, A. · MRN 44 812 907 · 14:26:38 · model v4.2 · conf 0.94

Provenance on every algorithm-derived alert: who, when, which model, how sure.

Don't
STEMI pattern detected — anterior leads V2–V4

No patient, no time, no model version. Correct on the wrong record and nobody could tell.

Do
Lead V3 signal quality degraded
Re-apply the electrode and re-acquire.

A recoverable input problem, announced so the clinician knows the interpretation is limited.

Don't
Analysis complete

Silent about the degraded lead. The result looks as trustworthy as any other.

Do
Technical — ECG telemetry lost
This patient is not being monitored. Absence of further alarms does not mean absence of events.

Names the kind and the consequence. The sentence that matters is the second one, and a clinician almost never gets it.

Don't
Lead V3 signal quality degraded

Identical to a physiological banner beside it. The reader cannot tell "the patient is deteriorating" from "we have stopped being able to see the patient".

Do
Technical — results unchecked since 04:10 for 12 patients

The clinical consequence is the alarm. "Pathology feed unreachable" is the infrastructure fact underneath it, and belongs in the description.

Don't
Export to PDF failed — retry?

High-priority alarm red for a background job. Every real alarm afterwards is read through the lesson that red sometimes means this.

Do
hs-troponin rising — NSTEMI cannot be excluded

Two lines of budget, spent on the finding. Quotable to a colleague on the phone, word for word.

Don't
hs-troponin rising — NSTEMI cannot be excluded

Clipped at "cannot be…", which is the half that decides what happens. The tooltip carrying the rest does not exist on a cart.

Accessibility

Measured contrast

FillForegroundRatioResult
--alarm-critical White5.64:1AA
--alarm-urgent Black12.49:1AAA
--alarm-advisory Black8.78:1AAA
--alarm-info Black10.98:1AAA
--alarm-ok White6.07:1AA

Critical and confirmation sit in the AA band, not AAA. Reaching 7:1 would darken the red past the point where it reads as an alarm hue, which IEC conformance depends on. The trade is deliberate and belongs in your accessibility conformance report.

Outcomes of use

What this contributes to, in the terms of Usability & context of use. These are attributes believed to contribute to an outcome; the outcome itself is settled by observing real use in a specified context, not by this page.

Clinical safety notes

Risk controls this page specifies

These behaviours mitigate identified hazards and should be traced in your risk file (ISO 14971). Changing them is a design change with safety consequence, not a styling decision. Which of these the component keeps and which are yours is stated in the guarantees table; a control the component does not keep is one your risk file must show you keep.

Implementation

This section published an implementation built on class-variance-authority, importing cn from @/lib/utils — shadcn’s path, not this package’s. The registry page says of these components: “None at runtime. Not clsx, not tailwind-merge, not Radix.” A reader following that snippet added a runtime dependency to justify in a technical file, to build a component that does not have one.

$ npx shadcn@latest add https://md.notjustany.tech/r/alert-banner.json
<AlertBanner
  priority="critical"
  kind="physiological"
  title="STEMI pattern — anterior leads V2-V4"
  description="ST elevation 3.1 mm. Confirm ECG and activate the chest-pain pathway."
  provenance="Model 4.2 · confidence 0.94"
  when="2026-08-13T14:26:38Z"
  onAcknowledge={acknowledge}
  actions={<Button variant="outline">Open ECG</Button>}
/>

// 'title' is required and 'priority' has five permitted values, so a banner
// with no statement, or with a severity outside IEC 60601-1-8's coding,
// cannot be written.
// The real construction: a lookup, not a variant library.
// alarmSurface maps each IEC 60601-1-8 priority to its token pair, and
// ships in foundations, so a banner cannot invent a sixth severity.
import { alarmSurface, isAlarmCondition } from "@/lib/njt"

The class joiner is six lines and ships inside foundations. Swap in your own cn if you already have one — that is the only substitution this package invites.

NotJustAnyMed.Tech Design System · Alert Banner · v1.0 · draft for review
Reference applications named in this system are fictional; all patient data shown is fabricated.