跳到內容
調色盤星雲光譜
選擇版面配色

即時套用,保留目前的亮暗模式。

AnnouncementBar (am-announcement-bar)

AnnouncementBar 是 marketing、SaaS 與商店頁面的公告列。它提供語意 tone、可選連結、dismiss control,以及 inline / sticky placement。

  • message 是必要的公告文案
  • tone 支援 neutralbrandsuccesswarningerror
  • dismissible 會啟用內建的原生按鈕與關閉行為
  • position 支援 inlinesticky-topsticky-bottom
  • 可用 ariaLabel 與 consumer 傳入的 aria-live 補充通知語意
<AnnouncementBar
message="New documentation is available."
action={{ label: "Read the notes", href: "/notes" }}
tone="brand"
dismissible={true}
position="sticky-top"
/>

此元件不管理 cookie、會員偏好或後端公告狀態。詳見 playground /playground/marketing/