Skip to content
Design System
GitHub

A full-width notice at the top of the page or app about the app itself: maintenance, read-only mode, a trial ending, no connection. Tones, one action, optional dismiss.

Maintenance on Sunday, 02:00–04:00 UTC. Robots keep patrolling. The dashboard and the API are unavailable for up to 2 hours.

Banner default

Install
npx shadcn add @syncrobotic/banner

Also installs: lucide-react, @syncrobotic/cn, @syncrobotic/use-presence

Overview

A notice across the full width of the page or the app, above everything else, about the app itself. It stays while its condition holds.

When to use

  • Scheduled or running maintenance, read-only mode, a trial or licence about to end, no connection to the server.
  • Anything every page of the app is affected by, shown once at the top instead of on each page.

Use something else

  • A condition of one page, form or record, inside the content (a robot that is offline, a form that cannot be saved): Alert. An Alert sits in the flow with rounded corners beside what it is about; a banner spans the app edge to edge and is about the app.
  • The result of what someone just did, or a minor event that passes: Toast (the control app: the island's notices). A toast goes away by itself; a banner stays until its condition ends.
  • Something an operator must act on at a robot: Alarm.

More examples

States and real uses. Each example is also a Storybook story and a visual regression test.

Read-only mode. You can view robots and missions. Changes are paused while the database is upgraded, until about 16:00.

Back online. Uploading 1,204 events recorded while offline; the event log fills in as they arrive.

Your trial ends in 3 days. After that the 14 robots keep running, but you can no longer change missions.

Banner tones

Read-only mode. Changes are paused while the database is upgraded, until about 16:00.

Overview

The shell ends at the bottom of the frame, under the banner, whatever the banner's height.

Banner above app shell

Usage rules

  • About the app, not one record: maintenance, read-only mode, a trial ending, no connection. A condition of one page or form is an Alert in the content; the result of what someone just did is a Toast.
  • Full width, first in the page (or above the whole app), before the header in the DOM so it is read first. At most one at a time: show the most severe and let the next one wait.
  • Tone by consequence: neutral for calm conditions, info only while a process runs (syncing back, a maintenance window under way), warning before something is lost, danger when the app cannot work. Danger is a tint, never solid red. Give it an icon that names the subject (Wrench, Lock, CloudOff).
  • role="status" for neutral, info and warning (read politely); role="alert" only for danger. It is not role="banner", which is the page header landmark.
  • One action at most, named by its result ("Choose a plan", "Retry now"): a Button, size md, outline.
  • Dismiss only when the condition does not need the person (news, a trial reminder). Remembering it is yours: onDismiss stores it, then pass open={false}. A condition that ends by itself (offline, read-only) has no close button and leaves when it ends.
  • Above the AppShell: the shell is as tall as the screen unless --app-shell-height says otherwise. Put the banner and the shell in a column as tall as the screen (flex h-dvh flex-col) and wrap the shell in min-h-0 flex-1 [--app-shell-height:100%], so a banner that wraps on a phone never pushes the shell's bottom off screen.

Changelog

  • 0.27.02026-11-21Opens and closes its height as it fades, so the page under it slides instead of jumping when it is dismissed or shown again.
  • 0.21.02026-11-20First release: neutral, info, warning and danger tones (role alert only for danger), an icon that can name the subject, one action, an optional close button (the caller remembers it), enter and exit movements, wraps at 375 px with 44 px targets.

How to upgrade