X Enterprises
nuxt-x-marketing

LayoutAnnouncementBar

Dismissible top-of-page announcement bar with badge, message, icon, and CTA link.

LayoutAnnouncementBar

A slim dismissible bar rendered above the navbar. Dismissed state is persisted to localStorage using storageKey. Supports color variants and an optional CTA link.

Components

<XMarkLayoutAnnouncementBar />

A slim dismissible bar rendered above the navbar. Dismissed state is persisted to localStorage using storageKey. Supports color variants and an optional CTA link.

<XMarkLayoutAnnouncementBar
  message="We just launched v2.0 with major performance improvements."
  badge="New"
  icon="i-lucide-rocket"
  link="/changelog"
  link-text="Read the changelog"
  variant="primary"
  :dismissible="true"
  storage-key="announcement-v2"
/>

Props

PropTypeDefaultDescription
messageStringDefault announcement textMain message
badgeString''Bold label shown before the message
iconString''Lucide icon name
linkString''CTA link URL
linkTextString'Learn more'CTA link label
variantString'primary'Color variant: 'primary', 'neutral', 'success', 'warning', 'error'
dismissibleBooleantrueShow close button
storageKeyString''localStorage key to persist dismissed state

AI Context

category: Layout
package: "@xenterprises/nuxt-x-marketing"
components:
  - XMarkLayoutAnnouncementBar
use-when: >
  Surfacing a time-sensitive promotion, product launch, or notice above the
  navbar. Dismissed state is persisted so it only shows once per user.
typical-page-section: Above the navbar, at the very top of the page.
Copyright © 2026