Components · Actions

Menu & popover

Transient surfaces that hold actions or detail. Both hide things behind a click, which is fine for the secondary and never acceptable for the urgent.

Stable · v1.0 shadcn/ui · Radix WCAG 2.2 AA

Overview

A menu holds actions. A popover holds content. A split button is a primary action with a menu of alternatives attached, and a menu button is a menu with no default. All four share one property that governs everything below: they are closed most of the time.

UseForNever for
Menu buttonA list of secondary actions with no obvious default The primary action of a screen
Split buttonA clear default plus alternatives — "Export PDF" with other formats Actions of equal weight; that is a menu button
PopoverSupporting detail too long for a tooltip — a reference range, an explanation of a model's scope Anything needed to act; anything requiring a decision
Dialog See Dialog when a decision must be made before continuing

Secondary only

Nothing behind a click is the only route to something a clinician needs. If it matters, it is on the screen.

Shallow

One level. Submenus cannot be held under interruption and are unreachable on touch with any reliability.

Yields

Positions itself clear of the alert region, closes on outside click and on Esc, and never blocks anything clinical.

Anatomy

Menu · split button · popover

Split button — a real default, alternatives attached.

Validated scope
Adult, 12-lead, non-paced rhythms. ST criteria are not validated in ventricular pacing.

Rules

Do's and don'ts

Do

The primary action is on the screen; the menu holds the secondary ones.

Don't

The action the screen exists for, one click down. Under time pressure it may as well not be there.

Do

Destructive item last, below a separator, visually distinct.

Don't

Permanent deletion between two routine actions, styled identically. One slip on a moving cart.

Do
Validated scope
Adult, 12-lead, non-paced.

Supporting explanation. The finding and its confidence are already on the screen behind it.

Don't
Confidence 0.94
Model v4.2 · trained to 2025-11

Reliance information behind a click. On a touch display, at the moment of the decision, it is not there.

Accessibility

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 carried by this component

Trace these in your risk file (ISO 14971) and usability engineering file (IEC 62366-1).

Implementation

$ npx shadcn@latest add https://md.notjustany.tech/r/menu.json
<MenuButton label="More">
  <MenuItem onSelect={compare}>Compare with prior</MenuItem>
  <MenuItem disabled reason="needs a new ECG">Re-analyse</MenuItem>
  <MenuSeparator />
  <MenuItem destructive onSelect={discard}>Discard draft report</MenuItem>
</MenuButton>

// Enforced: clinical signals cannot be hidden behind a click.
if (containsAlarm(children)) {
  throw new Error(
    "[Menu] alarms and findings cannot render inside a menu or popover. " +
    "Use AlertBanner in the docked alert region."
  )
}
// Destructive items are always sorted last, below a separator.
NotJustAnyMed.Tech Design System · Menu & popover · v1.0 · draft for review
Covers Popover, Menu, Menu button and Split button. AcuteLine is a fictional reference application.