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.

API reference

Generated from the types. Every part also takes className.

Banner

Also takes every prop of <div> (except title).

tone
"neutral" | "info" | "warning" | "danger" = "neutral"neutral (default) for news and calm conditions; info only while a process runs; warning before something is lost; danger when the app cannot work.
icon
ElementTypeReplaces the tone's icon with one that says what it is about: Wrench for maintenance, Lock for read-only, CloudOff for offline.
title
ReactNodeThe condition in a few words, in bold: "Read-only mode". The children say what it means and until when.
action
ReactNodeOne next step: a Button (size md, variant outline) or a link through <Button asChild>. Named by its result: "Upgrade plan", not "Learn more".
onDismiss
() => voidShows a close button. Remembering that it was closed (and for how long) is yours: set open false and store it. Leave it out for a condition that ends by itself (offline, read-only).
dismissLabel
string = "Dismiss"The close button's name for screen readers.
open
boolean = truefalse hides it: it fades and closes its height. Default true.