Skip to content

Banner ​

SBanner is a full-width strip that speaks for the whole application — "you are offline", "a new version is available", "your trial ends in 3 days" — and usually carries actions and a dismiss control. That is what separates it from SAlert: an alert sits in the content flow and describes the thing next to it, while a banner spans the app width, normally above or below the app bar, and belongs to the page as a whole. Both share the same status vocabulary (info/positive/warning/negative) and the same announcement rule: negative interrupts the screen reader (role="alert"), every other variant is announced politely (role="status").

Variants ​

The default variant is neutral — an announcement that reports no status and therefore carries no icon. The status variants add the icon of the matching SAlert status.

We use cookies to keep you signed in.
A new version of the app is available.
All changes have been published.
Your trial ends in 3 days.

A banner is square by default: it runs from edge to edge of the application, where rounded corners look like a mistake. Pass :square="false" for a banner inset into the content, bordered to outline it in the variant color, and color to take the accent from the palette.

Outlined in the variant color.
Inset into the content, with a palette accent.

Title and actions ​

The title prop (or the title slot) sits above the message, and the actions slot holds the buttons. They stay at the end of the row on a wide screen and move under the message below the sm breakpoint, where a squeezed row of buttons would be hard to hit.

A new version is available
Reload the page to get the latest build.

Dismissing ​

closable adds a close button: it hides the banner and emits close. Bind v-model:visible to keep the decision — an application that stores it can restore the banner on the next visit. The button's accessible name comes from the locale dictionary (close); override it on one instance with closeLabel, or replace the dictionary entry through ConfigProvider. The close slot replaces the button entirely and receives the close handler.

Your trial ends in 3 days
Upgrade to keep the workspace after the trial.

Sticky ​

sticky pins the banner to the top of its scroll container, so an app-wide message stays in view while the page scrolls under it. The example below scrolls inside its own box; in an application the banner is usually the first child of the page scroller.

You are viewing an archived project.
Scroll inside this box — the banner stays on top.

API ​

Props

NameTypeDefaultDescription
variant | "info" | "positive" | "negative" | "warning" | "neutral""neutral"Semantic variant: neutral/info/positive/warning/negative. neutral by default — a banner usually carries an announcement, while a status is the exception.
colorstringundefinedAccent color: a name from the palette (primary/teal/teal-10). Overrides the variant color.
titlestringundefinedTitle above the message (can be replaced with the title slot).
iconstring | falseundefinedIcon (a registry name or a raw SVG path). Overrides the variant's status icon; false leaves the banner without one. The icon slot takes precedence.
closablebooleanfalseShows the close button: it hides the banner and emits close.
close-labelstringundefinedAccessible name of the close button (defaults to the locale dictionary).
stickybooleanfalseSticks the banner to the top of its scroll container while the page scrolls under it.
borderedbooleanfalseOutlines the banner with a border in the variant color.
squarebooleantrueSquare corners. Enabled by default: a banner spans the whole application width, and rounded corners against the window edges look like a mistake. Set :square="false" for a banner inset into the content.
visiblebooleantrueWhether the banner is shown. The close button hides it by itself; v-model:visible brings it back, so an application that remembers the dismissal restores the state on the next visit.

Events

NameSignatureDescription
update:visible(value: boolean) => voidEmitted when visible changes. Used for two-way binding (v-model:visible).
close() => voidThe close button was clicked.

Slots

NameDescription
defaultMessage.
titleTitle (alternative to the title prop).
iconCustom icon (replaces the status icon).
actionsActions at the end of the row; they wrap under the message on narrow screens.
closeClose control instead of the built-in button; closable still has to be set.