Banner

A message in the page flow about the page or section it sits in: a problem, a precondition, a result, or something new. It stays until it's resolved, and it never blocks.

Playground

Dismiss it to see the close; it comes back.

Calibration is out of date

The CTD on Kystdata 3 was last calibrated 14 months ago.
Variant
Size
Theme
<Banner
	variant="warning"
	title="Calibration is out of date"
	description="The CTD on Kystdata 3 was last calibrated 14 months ago."
>
	{#snippet action()}
		<Button size="sm">Schedule service</Button>
	{/snippet}
</Banner>

Variants

Each one says when to use it. The intent tints the surface and the icon. Text stays in the normal foreground colors, so it's as readable as the rest of the page.

Neutral

Context or a hint that helps but changes nothing: how a page works, where something moved.

Info

Something worth knowing about this thing right now: a pending change, a new feature here.

Success

A result that stays relevant after the moment, like an import that finished with a summary. A passing confirmation is a toast.

Warning

Something will go wrong or is limited unless someone acts: missing setup, stale data, a permission you lack.

Danger

Something failed or is broken now, or an action that can’t be undone is about to happen.

Sizes

md is the default. sm is for forms, sheets and dense panels, where a md banner would outweigh the fields around it. A sm banner with children only makes a one-line note.

Email change pending

We sent a confirmation link to the new address.

Email change pending

We sent a confirmation link to the new address.
Changing the depth affects 3 scheduled missions. They'll be updated when you save.
Latitude must be between -90 and 90.

With an action

When there's a fix, put it in the banner. When it's narrow, the action drops below the text.

Permission required

Only organization admins can change billing.

No billing method

Missions can't be scheduled until one is added.

Rich description

Pass a snippet when the description needs a link or emphasis. Links take the foreground color with an underline.

Want to cancel a mission?

Missions less than 48 hours away can't be cancelled here. Contact operations and we'll sort it out.

Dismissible

For news and hints, never for a problem that still applies. The banner hides itself; use ondismiss to remember it.

New: calendar subscription

Follow your missions in Outlook or Google Calendar.
<Banner
	variant="info"
	icon="sparkles"
	title="New: calendar subscription"
	dismissible
	ondismiss={() => localStorage.setItem('seen-calendar-news', '1')}
/>

Rules

  • One banner per region. Two stacked banners compete; merge them or pick the one that matters.
  • Put it where the problem is: at the top of the page for the page, inside the section or form for that section. Never floating.
  • Title says what, description says why or what to do. A title alone is fine; a paragraph is not. Two lines of description at most.
  • If the fix is an action, put the button in the banner. Use a secondary button, size sm (xs in a sm banner). Not primary: the page has its own.
  • Don’t change the icon to something decorative. The default icon carries the meaning for anyone who can’t tell the colors apart.
  • Only dismissible if it’s safe to forget. Warnings and errors that still apply stay until they’re fixed. Remember the dismissal with ondismiss, or it comes back on reload.
  • Not a toast. If it’s only true for a moment (“Saved”), use a toast. A banner is still true when you scroll back.
  • Announce it only when it appears because of something the user did: role="alert" for warning and danger, role="status" for the rest. A banner present on load stays silent.