// Generated by scripts/generate-showcase.mjs. Do not edit directly.
page AnnouncementBarDetail {
layout = "showcase"
state playground_badge = ctx.url.searchParams.get("pg_badge") ?? ""
state playground_badgeIcon = ctx.url.searchParams.get("pg_badgeIcon") ?? ""
state playground_message = ctx.url.searchParams.get("pg_message") ?? "Announcement"
state playground_description = ctx.url.searchParams.get("pg_description") ?? "A polished default announcement bar for a modern application."
state playground_icon = ctx.url.searchParams.get("pg_icon") ?? ""
state playground_actionLabel = ctx.url.searchParams.get("pg_actionLabel") ?? "Announcement Bar"
state playground_actionHref = ctx.url.searchParams.get("pg_actionHref") ?? "#announcement-bar-demo"
state playground_actionIcon = ctx.url.searchParams.get("pg_actionIcon") ?? ""
state playground_dismissible = (ctx.url.searchParams.get("pg_dismissible") ?? "true") === "true"
state playground_dismissLabel = ctx.url.searchParams.get("pg_dismissLabel") ?? "Announcement Bar"
state playground_sticky = (ctx.url.searchParams.get("pg_sticky") ?? "false") === "true"
state playground_compact = (ctx.url.searchParams.get("pg_compact") ?? "false") === "true"
state playground_size = ctx.url.searchParams.get("pg_size") ?? "default"
state playground_width = ctx.url.searchParams.get("pg_width") ?? "wide"
state playground_color = ctx.url.searchParams.get("pg_color") ?? "primary"
state playground_variant = ctx.url.searchParams.get("pg_variant") ?? "solid"
state playground_role = ctx.url.searchParams.get("pg_role") ?? "status"
state playground_live = ctx.url.searchParams.get("pg_live") ?? "polite"
state playground_class = ctx.url.searchParams.get("pg_class") ?? "showcase-instance showcase-instance--1"
seo {
title = "Announcement Bar"
description = "Publish a responsive notice with badge, icon, supporting copy, action, dismiss behavior, and width controls."
}
view {
Marketing component
Announcement Bar
Publish a responsive notice with badge, icon, supporting copy, action, dismiss behavior, and width controls.
19 props0 slots1 outputsTheme readyResponsive
Interactive playground
Configure Announcement Bar
Change any prop and inspect the server-rendered component immediately.
Live preview
Component code
<AnnouncementBar
description="A polished default announcement bar for a modern application."
actionLabel="Announcement Bar"
actionHref="#announcement-bar-demo"
dismissible="true"
dismissLabel="Announcement Bar"
/>
Event outputInteract with the preview to inspect the typed payload.
Live examples
Designed for real product surfaces
Compare configurations and resize the browser to check responsive behavior.
Recommended
Soft product notice
Use a calm, dismissible notice inside a constrained content area.
01
Live preview
Component usage.wrn
<AnnouncementBar
badge="Public notice"
badgeIcon="icon-[lucide--sparkles]"
message="All composite components are now available"
description="Review each component and its recommended use cases."
actionLabel="View components"
actionHref="#components"
actionIcon="icon-[lucide--arrow-down]"
dismissible="true"
dismissLabel="Announcement Bar"
/>
Compact
Wide solid announcement
Use stronger contrast for important platform or service announcements.
Use edge-to-edge width for time-sensitive information that applies to the complete page.
03
Live preview
Component usage.wrn
<AnnouncementBar
badge="Service alert"
message="Scheduled maintenance tonight"
description="Some services may be temporarily unavailable from 23:00 to 23:30."
icon="icon-[lucide--triangle-alert]"
actionLabel="View status"
actionHref="#status"
dismissible="true"
dismissLabel="Advanced example"
size="lg"
width="full"
color="warning"
variant="solid"
/>
Component outputs
Receive every typed component output
Use declarative output handlers in .wrn files or register a direct output handler from JavaScript. The canonical API exposes payload and does not require event.detail.
@dismissFires after the announcement or feedback surface is dismissed.