Announcement Bar
A dismissible top announcement banner with a badge, message, arrow link and close button.
Copy a prompt for your AI coding tool with the source, dependencies and usage
Props
AnnouncementBarProps
Also accepts all props of Omit<React.ComponentProps<"div">, "children">
| Prop | Type | Default | Description |
|---|---|---|---|
| badge | string | "New" | — |
| message* required | React.ReactNode | — | — |
| linkLabel | string | "Learn more" | — |
| href | string | "#" | — |
| dismissed | boolean | — | Controlled dismissed state |
| onDismiss | () => void | — | Called when the user closes the bar |
Install
$ npx shadcn@latest add https://chromotion.dev/r/announcement-bar.json