npx shadcn@latest add https://sdk-components.thesqd.com/r/announcement.jsonimport { Announcement } from "@/components/ui/announcement";import { Announcement } from "@/components/ui/announcement";
export function Example() {
return <Announcement variant="success" tag="New" title="Workflow builder is live" href="/blocks/workflow-builder" />;
}Announcement (single component — pass everything as props)
├── surface .card-surface, rounded-full — hairline, ring and
│ theme-aware shadow — the same neutral hairline
│ on every tone; tones tint the fill (opaque, mixed
│ into --card, so it holds on any background)
├── variant="default | brand | info | success | warning | destructive"
├── tag={<ReactNode>} (the chip on the left — "New", "Beta", "Error";
│ always a visible chip, its color at 15%)
├── tagVariant="…same tones…" (the tag's own color — differs from `variant`
│ for a duotone pill; defaults to `variant`)
├── title={<ReactNode>} (the message; falls back to children)
├── href / target / rel (the whole pill becomes a link)
├── linkAs={Link} (your router's link for client-side navigation)
├── onClick={() => void} (a button instead, when there's no href)
└── arrow={boolean} (trailing ↗ — on by default when interactive;
nudges up-right on hover, with a shadow lift)| Prop | Type | Default | Description |
|---|---|---|---|
variant | "default" | "brand" | "info" | "success" | "warning" | "destructive" | "default" | Color treatment. `default` is the plain card surface; the rest tint it — the same vocabulary as Banner and Alert. |
tag | ReactNode | — | The chip on the left of the pill. |
tagVariant | "default" | "brand" | "info" | "success" | "warning" | "destructive" | — | The tag's own color. Set it to something other than `variant` for a duotone pill. Defaults to `variant`. |
title | ReactNode | — | The message. Falls back to `children`. |
href | string | — | Makes the whole pill a link, with a trailing arrow. |
target | string | — | Anchor target when `href` is set. |
rel | string | — | Anchor rel. Defaults to `noopener noreferrer` when `target="_blank"`. |
linkAs | React.ElementType | "a" | What `href` renders as — pass Next's `Link` for client-side navigation. |
onClick | (event) => void | — | Makes the pill a button, with a trailing arrow. Ignored when `href` is set. |
arrow | boolean | — | Show the trailing arrow. Defaults to on whenever the pill is interactive, off otherwise. |
className | string | — | Override or extend the resolved variant classes. |