Components · Structure

Masthead

The one element on every screen, carrying the facts that must never be wrong.

Stable · v1.0 shadcn/ui WCAG 2.2 AA

Overview

The masthead is the only component present on every screen, which is why what it carries is decided rather than accumulated: the product, the environment, who is signed in and where they are sitting. Every addition dilutes those four.

How these four sit together — the anatomy of a screen, how deep a hierarchy may go, and what has to happen on a route change — is on Navigation.

What the masthead carries

It is the only element on every screen, so it is where the facts that must never be wrong go — and nothing else, because every addition dilutes them.

Product, environment, identity, workstation
AcuteLine TRAINING — not for clinical use S. Whitfield · Registrar ED workstation 4
CarriesRule
Product name Always. On a shared workstation running four clinical applications, "which system am I in" is a real question with real consequences.
Environment, when it is not production Training, test or staging, in words, on a filled surface. Never a tint somebody has to notice. A test instance that looks like the live one is how test data reaches a record — see Commissioning.
Signed-in identity Name and role in text. Never an avatar alone, which identifies nobody to a colleague standing behind the chair.
Workstation Which physical machine this is, for shared devices and for Sign in's attribution argument.
Degraded-mode statement When a source system is unreachable or the device is in a reduced mode, the masthead says so persistently — it is the one place a reader cannot navigate away from.

What does not go in it. Alarms — those have their own region and their own layer, per Elevation. Dismissible notifications, which would make the masthead a place things disappear from. And primary navigation as well as a side panel: navigation lives in one place, because a reader who has to check two places to find a section will check one and conclude it is absent.

What the component enforces, and what it only asks for

Four facts, three of them held by requiring them and one of them impossible to check.

RuleHeld by How
The product is always namedThe component appName is required.
Asserted: Masthead: the product and the signed-in identity are both named
The environment banner is textThe component Rendered as words, so “TRAINING — not for clinical use” survives greyscale, a projector and a photocopy.
Asserted: Masthead: a non-production environment announces itself in words
Identity is readable, not initialsThe component user takes a name and a role and renders both.
Asserted: Masthead: the product and the signed-in identity are both named
The environment banner borrows no alarm colourThe component Inverted text on the foreground colour. It was drawn on the advisory alarm surface, and a training instance shows that banner on every screen all day — teaching the colour to mean “not real”.
Asserted: Masthead: a non-production banner borrows no alarm colour
The environment shown is the environment runningYou environment is a prop. A staging build that forgets to pass it renders as production, which is the failure the banner exists to prevent — wire it from the same source as your API base URL, not by hand.
The workstation is identifiedYou Not a prop at all. On a machine twelve people share, that is the third of the three facts this page says are needed.
Why this is written down

A rule stated on a component page reads as a rule the component keeps. 3 of these 5 are; 2 are obligations this page was quietly handing to the reader. The banner cannot be styled away. It can be forgotten, and a forgotten environment banner reads as a live system.

Do's and don'ts

Do
AcuteLine S. Whitfield · Registrar ED workstation 4

Name, role and workstation. On a machine twelve people share, all three are needed.

Don't
AcuteLine SW

Initials in a circle. Two initials are not an identity, and the role that determines what can be attributed is nowhere.

Do

AcuteLine   TRAINING — not for clinical use   S. Whitfield · Registrar

The environment is words on every screen. It survives greyscale and a photocopy, and it cannot be styled into a subtle tint.

Don't

AcuteLine   S. Whitfield · Registrar

(orange border = training)

A training system distinguished by a border colour. On a washed-out cart display or to a colour-blind reader it is the live record, and a practice order goes to a real pharmacy.

Do

AcuteLine   S. Whitfield · Registrar · ED workstation 4

Name, role and workstation. On a machine twelve people share, all three are needed to know whose session this is and where it is happening.

Don't

AcuteLine   SW

Two initials in a circle. Not an identity, and the role that decides which actions are permitted is not shown at all.

Accessibility

Outcomes of use

Clinical safety notes

Risk controls this page specifies

Trace these in your risk file (ISO 14971) and usability engineering file (IEC 62366-1). 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

$ npx shadcn@latest add https://md.notjustany.tech/r/masthead.json
<Masthead
  appName="AcuteLine"
  environment="training"   // omitted in production
  user={{ name: "S. Whitfield", role: "Registrar" }}
/>
NotJustAnyMed.Tech Design System · Navigation · v1.0 · draft for review
Covers Masthead, Side navigation and Breadcrumb. AcuteLine is a fictional reference application; all patient data shown is fabricated.