Announcement
newA pill above a hero headline with a tag, a title and an arrow.
NewForm primitives are here
Ship forms that feel finished
Installation
npx shadcn@latest add @blank/announcementUsage
import {
Announcement,
AnnouncementTag,
AnnouncementTitle,
} from "@/components/ui/announcement"<Announcement asChild>
<a href="/changelog">
<AnnouncementTag>New</AnnouncementTag>
<AnnouncementTitle>
Read the release notes
<ArrowRightIcon />
</AnnouncementTitle>
</a>
</Announcement>With asChild the pill becomes your link or button and picks up a hover
surface and a focus ring; a trailing icon in the title nudges forward on hover.
The pill never wraps. A title that does not fit is clipped; wrap the text in a
<span> to end it in an ellipsis instead.
Examples
Variants
brand tints the pill with the identity color for the one announcement that
matters most on a page.
API Reference
Announcement
| Prop | Type | Default |
|---|---|---|
variant | "default" | "brand" | "default" |
asChild | boolean | false |
AnnouncementTag and AnnouncementTitle are spans that take any span props.