Skip to content
Component installs need the registry setup— the Base UI shadcn project, the @vegastack namespace and the Cloudflare Access service token.
VegaStack Design

Announcement Banner

A dismissible one-line announcement — the full-width inverse page-top band.

Status
stable
Since
0.3.0
Accessibility pattern
ARIA status region (opt-in)

Last updated

Workflows now orchestrate revenue agents.Read more

Install

Add Announcement Banner from the VegaStack registry. The CLI verifies the item's integrity hash before writing it.

pnpm dlx shadcn@latest add @vegastack/announcement-banner

The same command installs the registry items it composes: @vegastack/icon-button.

Usage

<AnnouncementBanner dismissable action={<a href="/changelog">Read more</a>}>
  Workflows now orchestrate revenue agents.
</AnnouncementBanner>

When to use

AnnouncementBanner is the one full-width inverse strip that spans the top of a page (foreground fill, on-background text, centered copy). For an in-content notice or a plan/trial row, use Alert with variant="strip" — a compact single-line ribbon with an icon, message, and action — rather than a second banner component.

Live announcements

A page-top band that exists at load is chrome, so it carries no live role — announcing it would compete with the page's own heading for the first thing a screen reader user hears. Pass live only for a banner that mounts (or re-words) after the page has settled; it then becomes a polite role="status" region.

Examples

Workflows now orchestrate revenue agents.Read more

Dismissal

Uncontrolled by default (the banner removes itself). Pass onDismiss to own it — persist the choice and stop rendering; the button then only notifies.

API Reference

PropTypeDefaultDescription
actionReact.ReactNodeAction slot rendered after the message (a link or small Button).
dismissablebooleanfalseShow the dismiss button; the banner removes itself unless onDismiss is given (controlled dismissal — persist it and stop rendering the banner).
dismissLabelstring'Dismiss announcement'Accessible name for the dismiss control.
livebooleanfalseMark this strip as a runtime announcement — mounted (or re-worded) after the page settled. Only then does it become a polite role="status" live region. The default is deliberately NO live role: a page-top band that is in the DOM at load is chrome, and announcing it competes with the page's own heading for the first thing a screen reader user hears (D23).
onDismiss(() => void)Called when dismissal is controlled by the host.

Data attributes and CSS variables on AnnouncementBanner

AttributeValues
data-live""
data-slot"announcement-banner" | "announcement-banner-action" | "announcement-banner-dismiss"

Accessibility

  • The banner carries no live role at load. With live it is a polite status region, so keep its message brief and avoid continuously changing content.
  • The dismiss control has a caller-overridable accessible name and a minimum 24px hit area.
  • A composed action must keep visible link or button text; dismissal is never the only way to continue.
KeyAction
TabMove to the optional action and dismiss control.
Enter / SpaceActivate the focused button.
ContractStates tested
Behaviourdefault, open
Accessibilitylabeled, status-announcement, semantic-html
Visualdefault, hover

Do / Don't

Do
Announce one timely change and offer at most one direct follow-up action.
Don't
Use a banner for validation errors, multi-step forms, or content that needs an interruptive alert.

On this page