An announcement pill badge with a bold tag, message, and optional link arrow for hero sections, solid on light pages or frosted on dark heroes.
The import and the props worth knowing about, in one place.
import { Badge21 } from "@/components/beste/component/badge21";
import Link from "next/link";
// Compose the link with the render prop: your Link becomes the pill (and it
// shows the trailing arrow); the badge content stays as its children.
<Badge21 tag="New" text="The Auralis studio set is live" render={<Link href="/changelog" />} />
<Badge21
tag="v2.0"
text="Now with 1,400+ blocks"
tone="foreground" // tag chip: "primary" (default) | "foreground" | "secondary"
surface="solid" // "solid" (default) | "glass" for dark heroes
/>Read from the component's own type, so this cannot drift from what it accepts.
| Prop | Type | Default | Description |
|---|---|---|---|
tag* | string | — | The small emphasized tag (e.g. "New") |
text* | string | — | The announcement text |
asChild | boolean | — | Compose the rendered element shadcn-style (radix asChild): your element (e.g. a router Link) becomes the pill and the badge content is injected as its children. Pass the element without children of its own. |
children | React.ReactElement | — | The element to render when `asChild` is set (e.g. your framework's Link) |
href | string | — | Fallback link: renders a plain `<a>`. Prefer `asChild` with your framework's Link component for client-side navigation. |
tone | "primary" | "foreground" | "secondary" | — | Tag chip color |
surface | "solid" | "glass" | — | A solid pill for light pages, or a frosted one in the current text color for dark heroes |
className | string | — | Additional classes merged onto the root |