Notice

A message that stays on the page until its cause is gone: the machine is offline, a fault blocks brewing, an update is ready.

HTML
<div class="bm-stage">
  <section class="bm-tile" style="width:366px">
    <div class="bm-notice" role="status"><span class="bm-notice__icon" data-loader data-size="20"></span><div class="bm-notice__body"><span class="bm-notice__title">Connecting to the machine</span><span class="bm-notice__text">This takes a few seconds after it wakes.</span></div></div>
    <div class="bm-notice bm-notice--info"><span class="bm-notice__icon" data-icon="info" data-size="20"></span><div class="bm-notice__body"><span class="bm-notice__title">Version 1.8.0 is ready</span><span class="bm-notice__text">Adds flow profiling. Installing takes about 2 min.</span><div class="bm-notice__actions"><button class="bm-btn bm-btn--outline">Install</button><button class="bm-btn bm-btn--ghost">What's new</button></div></div></div>
    <div class="bm-notice bm-notice--success"><span class="bm-notice__icon" data-icon="check" data-size="20"></span><div class="bm-notice__body"><span class="bm-notice__title">Updated to 1.8.0</span><span class="bm-notice__text">The machine restarted and is heating.</span></div></div>
  </section>
  <section class="bm-tile" style="width:366px">
    <div class="bm-notice bm-notice--warning"><span class="bm-notice__icon" data-icon="triangle-alert" data-size="20"></span><div class="bm-notice__body"><span class="bm-notice__title">Water low</span><span class="bm-notice__text">About two shots left. Fill the tank before the next one.</span></div><button class="bm-btn bm-btn--icon bm-btn--quiet" aria-label="Dismiss" style="margin:calc(var(--space-2) * -1) calc(var(--space-2) * -1) 0 0"><span data-icon="x" data-size="20"></span></button></div>
    <div class="bm-notice bm-notice--danger" role="alert"><span class="bm-notice__icon" data-icon="circle-alert" data-size="20"></span><div class="bm-notice__body"><span class="bm-notice__title">Boiler sensor lost</span><span class="bm-notice__text">Heating is off. Check the sensor cable, then restart the machine.</span><div class="bm-notice__actions"><button class="bm-btn bm-btn--outline">Restart</button><button class="bm-btn bm-btn--ghost">Details</button></div></div></div>
  </section>
  <div class="bm-stack" style="width:296px">
    <span class="bm-eyebrow">Across a page</span>
    <div class="bm-notice bm-notice--page bm-notice--danger" role="alert"><span class="bm-notice__icon" data-icon="circle-alert" data-size="20"></span><div class="bm-notice__body"><span class="bm-notice__title">The machine is offline</span><span class="bm-notice__text">Last seen 14:41. Check that it is switched on and on Wi-Fi.</span><div class="bm-notice__actions"><button class="bm-btn bm-btn--outline">Try again</button></div></div></div>
  </div>
</div>
  • Use a Notice for anything the person must know before their next action and that will still be true in a minute. Something that just happened and needs no action is a Toast. One or two words of state are a Chip.
  • Inside a tile it is a cell-sized block (radius-lg). Across a page, above the first tile, use bm-notice--page, which is tile-sized (radius-xl).
  • One Notice per cause, and the most severe first. Three warnings become one Notice that says "3 things to check" and links to the list.

Anatomy

.bm-notice: a 20 px glyph in .bm-notice__icon, then .bm-notice__body with .bm-notice__title in body at weight 500, .bm-notice__text in body-sm, and optional .bm-notice__actions holding one or two bm-btn--outline buttons. Padding space-3 by space-4, gap space-3.

Tones

ClassGroundGlyphFor
neutralsurface-2 (surface-1 on a page)info, or a LoaderWork in progress: "Connecting to the machine".
bm-notice--infoprimary-softinfo in primary-textSomething new that can wait: an update is ready.
bm-notice--successsuccess-softcheck in successA long task finished: "Updated to 1.8.0".
bm-notice--warningwarning-softtriangle-alert in warningAttention before the next shot: water low, flush recommended.
bm-notice--dangerdanger-softcircle-alert in dangerA fault, or the machine cannot be reached.

Title and text are ink and ink-muted on every ground (11:1 and 5.4:1 or better); only the glyph takes the status colour, and it always comes with the title's words. There is no orange Notice: heating is not a message.

Content

  • Title: what is true, at most 40 characters, no full stop: "The machine is offline", "Boiler sensor lost".
  • Text: what it means and what to do, one or two sentences. See Content for the error pattern.
  • Buttons: verbs that name the fix, most likely first: TRY AGAIN, DETAILS. Never OK or DISMISS on a danger Notice; it leaves when the fault does.
  • A warning Notice may have a close button (bm-btn--quiet, "Dismiss"); the warning stays in the top bar's list.

Keyboard and screen reader

  • A danger Notice that appears while the page is open is role="alert". Every other tone is role="status". One that is there when the page loads has no live role; it is just content, placed first.
  • Do not move focus to a Notice. Its buttons come in the normal Tab order.
  • The glyph is aria-hidden; start the title with the state in words when the tone matters ("Warning: water low" is not needed, "Water low" is enough, because the word carries it).