A full-width banner with a centered icon + message, used for page- or app-level announcements.
Use AnnouncementBar for a persistent, layout-level notice spanning the full width (site-wide notice, maintenance banner, promo). Its content is centered and width-capped.
FlashMessages.InfoBox.There is no @uxf/form twin.
import { AnnouncementBar } from "@uxf/ui/announcement-bar";
<AnnouncementBar color="negative">Announcement...</AnnouncementBar>
// no icon
<AnnouncementBar color="brand" icon={false}>
Announcement...
</AnnouncementBar>
// custom icon
<AnnouncementBar color="neutral" icon="chevronDown">
Announcement...
</AnnouncementBar>
AnnouncementBarProps:
| Prop | Type | Default | Description |
|---|---|---|---|
children |
ReactNode |
— (required) | Banner content. |
color |
AnnouncementBarColor |
"warning" |
Color scheme (brand, info, negative, neutral, positive, warning). |
icon |
IconName | false |
per color |
Leading icon. Pass false to hide it. |
color values come from theme.ts (AnnouncementBarColors): brand, info, negative, neutral, positive, warning; each sets the banner background.
The default icon depends on color: negative → solid-octagon-xmark, positive → solid-badge-check, warning → solid-triangle-exclamation, and brand/info/neutral → solid-circle-info.
Import the component stylesheets once in your global CSS (AnnouncementBar renders an Icon):
@import url("@uxf/ui/css/announcement-bar.css");
@import url("@uxf/ui/css/icon.css");
Also requires the global @uxf/ui token layer, set up once per app — see @uxf/ui setup.