Raft Design System

Components · Feedback

Banner

A soft-tinted notice inside a dialog or form that people read before they act, and, as PanelNotice, a full-width strip under a panel header when something in that panel failed.

StableAlso called Callout
import { Banner } from "@botiverse/raft-ui";

A banner is a short notice that people need to read before they act: who can see a shared channel, what a delete removes, or a limit they are about to reach, and how to get past it. It sits inside the content of a dialog or a form, on a soft tint that says its intent. When something in one panel goes wrong, the same notice runs as a strip under the panel header instead; see Inside a panel.

banner/compositions/preview

When to use

The wider the scope of a message, the further out it goes; the full table is in Feedback.

SituationUse
One input is invalidThe input's error (Field), not a banner
Something to know before acting in a dialog or a formBanner, in the content
A one-line tip at the top of a list page, pointing to a feature people may not knowAn info Banner, one sentence, no actions and no ×: a tip, not a task, and lighter than the page's primary action (cindyz, 2026-11-10, #triage:b56acab7). Say when it comes down, such as once the person has used the feature or some weeks after launch: a tip that never leaves becomes noise to everyone who already knows (Kirby)
Something in one panel failed: an agent won't start, a setting didn't savePanelNotice, under the panel header (Panel)
The state of the whole server: a computer offline, a quota nearly fullNotificationCenter, not a banner at the top of the page
A signed-out visitor on a public page: sign upThe sign-up prompt, not a banner (see below)
A phone's own browser arrived on a Raft address the app opens: open the Raft appThe open-in-app offer, not a banner (see below)
The result of something the person just didToast
The person must decide nowDialog; AlertDialog only for the confirmations a product lists
A change made in one list row is held until the person picks what happensA sm banner attached under the row (see below)

Anatomy

  • Banner: the tinted container. Required. It fills the width it is given and lays out its parts by that width, so give it a width (or let it fill its parent); never w-fit, which collapses it.
  • An icon: the intent's Lucide icon (Variants) as a direct child, before the text. Banner sizes it 20px with 10px before the text (16px and 8px in a sm banner) and centers it on the first line (A mark that leads text). While something is still pending, such as a computer that hasn't connected yet, a Spinner takes the icon's place in a status="info" banner: waiting is not a problem, so it gets neither the warning tint nor its icon. Banner centers the spinner in the icon's column on the first line, so the text starts where it does after an icon. Never a Status light in its place: a status light never says what kind of notice this is (success, info, warning, error). A status light keeps its own meanings, whether an agent, a person or a computer is working or online, a task's status, and the square attention dot that marks something waiting or unread; a notice about one of those things may still show that thing's light inside it (Status).
  • BannerTitle: an optional bold first line.
  • BannerDescription: the message. It takes only a HelperText, made with helperText(content, { why, about }), and renders its why and about as data-why and data-about, and is only for a consequence (consequence), who sees it or whom it affects (audience), or how to recover (recovery) (Writing › Helper text). A status with no next step ("Waiting for the computer to connect…") is a BannerTitle alone, a Toast, or nothing. An inline text action goes inside it as a TextLink variant="strong", because it sits in a sentence (TextLink).
  • BannerAction: the banner's button, and Dismiss before it when the banner has one. It sits at the bottom right: at the end of the last line of text, centered on that line, while the text fits beside it on one line. With a title and a description, that line is the description's. When the text would wrap beside it, or the banner is narrower than 480px, it takes a line of its own under the text, aligned to the end. BannerAction decides this itself; don't place it. The width is a container query on the banner's content: 452px, which is a 480px banner at md (476px at sm, 484px at lg).
  • BannerClose: the × of a banner that has no button. A frameless icon button at the end of the first line, centered on it, whose icon box ends on the banner's padding, like a frameless icon button at the end of a header (Alignment). Its label defaults to "Dismiss". Don't use it with BannerAction: a banner with a button closes with Dismiss. If both are there, raft-ui warns in development and puts the actions on a line of their own, so they never share the ×'s place.

Variants

The status prop sets the tint. Each intent has one icon.

VariantUse forIcon
status="info"Information and limitsInfo
status="warning"Something to watch that can be recovered from, including errorsTriangleAlert
status="destructive"A consequence that cannot be undone, usually in a delete confirmationOctagonAlert
status="success"Something finished or saved: a BannerTitle alone (a success has no why), or a ToastCircleCheck
banner/compositions/info
banner/compositions/action-variants

Under 480px, as on every phone, the buttons go under the text, at the end:

banner/compositions/narrow

A banner with no button closes with BannerClose:

banner/compositions/close
  • Use status="warning" when something goes wrong; destructive is only for consequences that cannot be undone (Color).
  • raft-ui also has a neutral status="default" on fill-muted. The system's banners always state an intent, so prefer one of the four above.

Sizes

size sets the padding and the icon, never the type: a banner's title and description are text-callout at every size, 14/20 on a phone and 14/22 on a desktop (Typography).

SizePadding (top and bottom × sides)Icon
size="sm"8px × 12px16px, 8px before the text
size="md" (default)12px × 14px20px, 10px before the text
size="lg"14px × 16px20px, 10px before the text
  • A banner's text is never smaller than its button's label. The text and the button sit side by side, and a banner's button has one size, the md button (32px, 34px with a mouse), whose label is text-control (14px on a desktop, 13px on a phone). Text smaller than that label makes the button look too big for its banner, so a sm banner tightens only its padding and its icon, never its text.
  • A sm banner with a button or a × keeps it 4px from its top and bottom edges, centered on the last line of text, so the text has (32px − one line) / 2 + 4px above and below it. The × needs the same room: its 32px hover fill on an 18px line would otherwise reach the banner's edge.

Content

  • Say what is happening now and what to do next (Writing, Feedback).
  • Put the subject in BannerTitle and the consequence in BannerDescription: "This channel is shared with Acme" / "People and agents from Acme will see what you post here."
  • Label the button with what it does, in sentence case: See who, Retry, View logs.

Accessibility

  • Banner renders a div with role="alert" for status="destructive" and role="status" for the other intents, so a notice that isn't urgent doesn't interrupt a screen reader.
  • The icon repeats the intent and is decorative. The title and description must say the intent in words.
  • BannerClose is labeled "Dismiss"; pass an aria-label that names the notice when a page has more than one thing to dismiss.
  • BannerClose doesn't move focus. When the banner goes, the app moves focus to the next element after where the banner was, or to the page's heading when there is none; never leave it on the document.
  • Keep the parts in reading order: the icon, the title, the description with its link, then BannerAction (Dismiss, then the button) or BannerClose. Tab reaches them in that order.

Rules

  • Show at most one banner in one place.
  • Put a banner inside what it is about: a dialog, a form, a panel, a list row. The one banner that floats is the web app's new version where there is no top bar (a phone, under 768px): it takes the toast's place, above the composer or the tab bar, with the floating shadow (shadow-float), and toasts stack above it (Feedback). Never float a banner over the top of the page, where it covers the top bar.
  • A banner about the whole window, not one page in it, sits in a strip across the window under the top bar and is flat: the full width, its tint, no radius and no border, with a line-seam under it. It is part of the window's frame, like the top bar above it, so a rounded, bordered banner inside a strip of its own would be a box in a box (Kirby, 2026-11-12, slock #14493). The one such banner today is the offer to open Raft Desktop.
  • Give a banner a line of its own, across the full width of what it is about, and never put a button beside it: not the page's primary action, not a toolbar's. The banner speaks about the content under it and a button about the page, so side by side the sentence reads as the button's caption, and in a narrower window it wraps into lines beside the button. On a page of a list, the add actions stay at the end of the toolbar and the banner goes between the toolbar and the list (cindyz, 2026-11-12, #triage:b56acab7).
  • Give at most one button, plus Dismiss before it when the banner can be dismissed, and only when there is a way out (the one exception is a notice attached to a list row): a 32px ink-bordered button (variant="default" size="md"). Never a pink button: a banner is not the screen's primary action.
  • Put the button in BannerAction, at the bottom right, so it comes after what it acts on and ends where the eye ends, as a dialog's commit button does. A banner that can be dismissed and has a button puts Dismiss (variant="ghost" size="md") just before the button, in the same BannerAction.
  • Use BannerClose only on a banner with no button, and never put a × in BannerAction, where it reads as one of the actions.
  • Don't add an ink border. A banner is a soft tint, not a sticker (Color); its edge is the container radius and a hairline.

Inside a panel

When something in one panel goes wrong (an agent won't start, the channel's settings didn't save), use PanelNotice from Panel, not a Banner. It is a region of the panel, not a card inside its content:

  • Place it directly under the panel header, across the full width of the panel.
  • Give it no radius and no hairline. It is closed by seams (line-seam) above and below; the one above is the panel header's.
  • Line its sides up with the panel's margins (Spacing).
  • Lead the text with the intent's icon, as a banner does (Variants), never a status light that says what kind of notice it is. PanelNotice keeps the icon's size and centers it on the first line (A mark that leads text).
  • Write one message of at most 2 lines, in PanelNoticeContent (semibold text-callout). That limit is for the sentence you write. A reason the system gives (why an agent won't start) is shown in full under your sentence, in the same PanelNoticeContent, with no line clamp: it wraps, however long, since it is what the person needs to fix the problem, on a phone too. Don't switch to a Banner to fit a long reason: every notice under one panel header is a PanelNotice.
  • Put the actions in PanelNoticeActions, on the right and centered on the first line of text: a small icon button (Copy details) or a text button (View logs). A 32px button doesn't make the strip taller.
  • Keep the default status="warning" for something to fix; use destructive only for what cannot be undone.

The sign-up prompt on a public page

A public page, such as a shared Artifact or a public channel, invites a signed-out visitor to sign up with one prompt. It is not a Banner: a banner has a button or a ×, never both, and has no centered neutral strip. Compose it from a Button (and, on a phone, an icon Button) in a plain container. The rules above stay as they are for banners: a banner with a button closes with a ghost Dismiss, never a ×.

On a desktop (sm and up):

  • A 48px strip across the full width of the window, above the page header.
  • fill-subtle, no border.
  • The sentence and one 32px outlined button (variant="default" size="md"), centered together, 24px apart. Never a pink button.
  • It can't be dismissed.

On a phone:

  • A block under the page header, on info-soft, with info-strong text.
  • The sentence, over at most 2 lines, and the outlined button under it.
  • An × at the top right, with a target of at least 44px. Remember the dismissal on the device.

Rules:

  • Show it only to signed-out visitors, and only on public pages; never in the signed-in app.
  • Show at most one on a page.
  • Never put a status in its place: what is true of this page (it failed to load, it is read-only, it changed) goes where When to use puts it.
  • Write one sentence that says what Raft gets the visitor, then the action: "Make pages like this with Raft and your AI agents. Sign up now and start building." Label the button "Sign up or log in".

The open-in-app offer

A phone's own browser (Safari, Chrome) that landed on a Raft address the app opens (a channel, a DM, a message link; whatever the app claims on that phone) offers the Raft app in one row, so the person can go on where replies and notifications already are. Like the sign-up prompt, it is an offer, not a notice, so it is not a Banner: compose it from an IconTile, a Button and an icon Button in a plain container.

  • One row at the bottom of the page, right above whatever holds the bottom: the composer on a conversation page, the tab bar on a top-level page. Across the full width, flat, on info-soft, with a line-seam over it; its tile starts on the page's 16px margin. It is laid out in the page, so it covers nothing. The bottom is where a thumb reaches; at the top of a phone it is hard to hit (artin, 2026-11-12, #proj-mobile:af0ad562). It is about the window, not one conversation, so it shows on any page the app opens, such as Tasks or Home, not only above a conversation's messages.
  • While the on-screen keyboard is up, the row is put away, and it comes back when the keyboard closes: someone typing did not come for the offer.
  • It counts as part of the page's bottom. A toast, and the new-version banner, sit 16px above the row's top edge while it shows, not above the composer or tab bar under it, so they never overlap it (Toast).
  • From the start: Raft's IconTile (sm) with the logo; a title, "Open in the Raft app", in semibold text-callout with foreground, and, for a message link only, one line under it in text-caption with foreground-muted ("Go straight to this message"), each on one line, truncated; then one 32px outlined button (variant="default" size="md"), Open, and an × at the end with a target of at least 44px. Never a pink button: the page under it is still the page.
  • Open is a real link to the same address on the host the apps claim (open.raft.build), so the system hands it to the app; the page never launches anything by itself. When no app takes it, that host sends the person back with a marker, and the page offers the download in a bottom sheet (the tile, "The Raft app isn't installed yet", one line, then Download Raft app and Keep using the web) instead of the row.
  • × and Keep using the web put it away for the browser session. Nothing tries to tell whether the app is installed.

Rules:

  • Show it only in a phone's own browser that arrived from outside on an address the installed app would open, while that page is on screen; an address the app doesn't take gets no offer, since Open would end in "not installed" for someone who has the app. Never in Raft's apps, the web installed as an app, or a chat app's in-app browser, which can't hand a link to an app (it gets its own sheet pointing to the system browser, not specified here).
  • Show at most one on a page.
  • On a computer the same arrival offers Raft Desktop, and there it is a Banner (status="info"), because it fits a banner's rules: Continue on web is its Dismiss and Open in desktop app its one button, on one line. A phone's 390px can't hold an offer's words beside a Dismiss and a button, which is why the phone offer has a shape of its own. On a computer:
    • It is the flat strip across the window under the top bar (see Rules): the offer is about the window, and a mouse reaches the top as easily as anywhere, unlike a thumb.
    • "Arrived from outside" on a computer means a link followed from another site (Raft's own website and docs, raft.build and docs.raft.build, are other sites: someone who follows their Open Raft or Sign in to the web app is asked, which is the website's way to Raft Desktop, decided with huxijin on 2026-11-15), or with no referrer a link to a message, thread, task or Artifact. A channel, a DM or a workspace page opened with no referrer is someone coming back to the web from a bookmark, the start page or the address bar, and gets no offer: in two days on production such pages drew 246 desktop offers and not one Open (Remy, #proj-mobile:#128). A phone keeps "no referrer" as outside, since a link tapped in a chat app has none and is the phone offer's main case.
    • Every signed-in person who arrived from outside gets it, since the page can't tell whether the app is installed. The title asks "Open this message in Raft Desktop?", or "Open this page in Raft Desktop?" for any other page.
    • The description is one line that says what the page knows: that the account used Raft Desktop lately; that this browser was told to open links in it; or, with neither, "Don't have it yet?" followed by this computer's download as a text link (TextLink, strong). The download is never a second button.
    • After Open in desktop app, the strip doesn't just leave: it reads "Opening Raft Desktop…" with "Nothing happened?" and the download as a text link, and an × in place of the actions (a banner without a button closes with ×). A page can't tell whether the app took the link, so someone without the app would otherwise see the offer vanish and nothing happen.
    • A signed-out person who arrived on a Raft address gets the same offer on the sign-in page, a computer's strip at the top and a phone's row at the bottom: the app may already be signed in, and going there beats signing in on the web a second time. An answer given there holds after sign-in; it is not asked again.
    • "Remember my choice" is a checkbox before the two actions. Continue on web without it keeps the offer away on this browser for 7 days, so someone who only uses the web doesn't meet it on every visit; with it, for good.

Attached to a list row

When a change made in one row of a list can't land until the person decides (new keys for a shortcut that another command already uses), the question goes in a sm banner directly under that row, not in a dialog: the row stays in view, and the decision is about it alone.

  • Use size="sm" and the intent of the question, usually status="warning": nothing is lost yet.
  • Put the subject in BannerTitle ("⌘/ is used by Open keyboard shortcuts") and what each choice does in BannerDescription ("Swap gives it this shortcut's old keys. Replace leaves it without a shortcut."), so the buttons can be one word each.
  • Give at most 3 actions, all in BannerAction: Cancel first, as a ghost button (variant="ghost" size="md"), then 1 or 2 choices as outlined buttons (variant="default" size="md"): Cancel, Swap, Replace. This is the same exit-first order as a dialog's footer (Cancel, then the commit button, Forms) and as a banner's own Dismiss before its button, so the way out is always in the same place, and the choices end where the eye ends, after the question they answer. The ghost Cancel against the outlined choices already tells the exit from the answers; no gap or reordering is needed. The choices are equal answers, so neither is pink. BannerAction places them as it places any banner's buttons: at the end of the last line while the text fits beside them, otherwise on a line of their own, aligned to the end.
  • More than 2 choices, or a choice that needs more than a word, is a Dialog.
  • Span the row's full width, matching the row's highlight: the highlight bleeds past the row's content on each side, 8px with a mouse and 12px on touch (a list cell's shape, Lists), and the notice has the same start and end. Its rounded tint then sits under the highlight as a second piece of the same shape and reads as part of that row. A notice only as wide as the row's content would leave the highlight's edges standing 8px outside its own with a mouse and 12px on touch, two edges where there should be one; a wider one would stick out past every other row's highlight. Inside it the sm padding (12px) puts the icon 4px past the row's text with a mouse and on it on touch.
  • Put it 2px under the row, the space between two list cells, and nothing between the two.
  • Show one at a time, under the row whose change it holds; it goes when the person chooses, cancels or leaves the row.
kbd-button/compositions/shortcuts-panel
  • Place it right after the row in the DOM, so Tab reaches its buttons next. Banner announces it politely (role="status"); Esc on the row cancels as Cancel does. When it goes, the app moves focus back to the control in the row.

API

A short notice people read before they act, on a soft tint that says its intent. Compose it from a leading icon, `BannerTitle`, `BannerDescription`, and either `BannerAction` (its button) or `BannerClose` (a × when there is no button).
PropTypeDefault
size"sm" | "md" | "lg""md"
status (required)"warning" | "default" | "success" | "info" | "destructive"
renderAllows you to replace the component's HTML element with a different tag, or compose it with another component.ReactElement | ((props, state) => ReactElement)

Also takes the attributes of its element.

BannerAction

The banner's buttons: at the end of the last line of text, centered on it, while the text fits beside them on one line; on a line of their own under the text, aligned to the end, when it doesn't or the banner is narrower than 480px.
PropTypeDefault
renderAllows you to replace the component's HTML element with a different tag, or compose it with another component.ReactElement | ((props, state) => ReactElement)

Also takes the attributes of its element.

BannerClose

The × of a banner that has no button: a frameless icon button at the end of the first line, centered on it, its icon box ending on the banner's padding. Never put it in `BannerAction`.
PropTypeDefault
loadingBusy: shows the spinner and blocks activation (click, Enter, Space and form submission) while keeping the button focusable. A busy button is `aria-disabled`, not natively `disabled`, so the focus a press left on it stays there and is still there when the wait ends.boolean
loadingLabelThe spinner's accessible name while `loading`: say what is happening.string
focusableWhenDisabledWhether the button should be focusable when disabled.booleanfalse
nativeButtonWhether the component renders a native `<button>` element when replacing it via the `render` prop. Set to `false` if the rendered element is not a button (for example, `<div>`).booleantrue
renderAllows you to replace the component's HTML element with a different tag, or compose it with another component.ReactElement | ((props, state) => ReactElement)

Also takes the attributes of its element.

BannerDescription

PropTypeDefault
children (required)HelperText
renderAllows you to replace the component's HTML element with a different tag, or compose it with another component.ReactElement | ((props, state) => ReactElement)

Also takes the attributes of its element.

BannerTitle

PropTypeDefault
renderAllows you to replace the component's HTML element with a different tag, or compose it with another component.ReactElement | ((props, state) => ReactElement)

Also takes the attributes of its element.

Changes

  • 0.109.1 · Design SystemA notice under a panel header shows a reason from the system in full: the sentence written for it stays at most two lines, and a reason the system gives (why something failed) wraps under it in the same PanelNoticeContent, unclamped. Such notices stay PanelNotice, never Banner. Components: PanelNotice.
  • 0.103.0 · Breaking ChangesExplanation slots take only a HelperText: FieldDescription, FormSection's description, a ChoiceList item's description, SelectItemDescription, DialogDescription, AlertDialogDescription, DrawerDescription, PopoverDescription, EmptyStateDescription, CardDescription, CardFooter, BannerDescription, DialogFooterNote (work in progress), MessageActionCardHint, MessageActionCardHeaderDescription, MessageActionCardScopeDescription and MessageActionCardActionsNote. A HelperText is made only by helperText(content, { why, about }): content is any ReactNode (a string, a formatted message, a TextLink inside a sentence), why is "consequence", "audience" or "recovery", and about names the thing the line is about. Each slot renders the content with data-why and data-about, and in development warns once when it is given anything else, which it still renders. ToastDescription, NotificationCenterItemBody, EmptyStateTitle, ListRowDescription and the status and data parts are unchanged.
  • 0.19.0 · Breaking ChangesBannerAction: the buttons sit at the bottom right, at the end of the last line of text and centered on it, while the text fits beside them on one line. When the text would wrap beside them, or the banner is narrower than 480px, they take a line of their own under the text, aligned to the end. BannerAction places itself; it sets data-wrap when it takes its own line.
  • 0.7.0 · ChangedBanner renders role="status", and role="alert" only for status="destructive", so a notice that isn't urgent no longer interrupts a screen reader. Pass role to override.
  • 0.5.35 · ChangedBanner's action spans two rows only when it comes after both the title and the description; an action placed before them no longer spans. The status column now always spans two rows.