Badge Examples
20 small labels for status, tags and counts: text, icons on either side, links and round counts, in default, secondary, outline and destructive. Each on React, Vue, Svelte and Solid, with Base UI, React Aria, Ark UI or Radix UI on React.
Every badge example
20 examples.
- Badge with Icon on LeftDestructiveA destructive badge with a star icon before the word Badge, for an error or another state that needs a symbol.

- Badge with Icon on LeftOutlineAn outline badge with a star before the word Badge, a border, and no fill, for a quiet tag that still has a symbol.

- Badge with Icon on LeftSecondaryA muted secondary badge with a star before the word Badge, for a category that should not pull the eye.

- Badge with Icon on LeftStandardA default badge filled with the primary color, with a decorative star icon before the word Badge.

- Badge with Icon on RightDestructiveA destructive badge with the word Badge first and a star icon after it, for an error with a trailing mark.

- Badge with Icon on RightOutlineAn outline badge with the word Badge first and a star after it, for light metadata with a trailing mark.

- Badge with Icon on RightSecondaryA muted secondary badge with the word Badge first and a star after it, for a trailing mark that stays quiet.

- Badge with Icon on RightStandardA default primary badge with the word Badge first and a star icon after it as a trailing mark.

- Badge with LinkDestructiveA destructive badge whose label Badge is a link that underlines on hover. The address in the file is #link.

- Badge with LinkOutlineAn outline badge whose label Badge is a link that underlines on hover. The address in the file is #link.

- Badge with LinkSecondaryA muted secondary badge whose label Badge is a link that underlines on hover. The address is #link.

- Badge with LinkStandardA default badge whose label Badge is a link that underlines on hover, for a tag that opens another view.

Or describe it. With Pro, your AI agent installs the badge example you describe, on your framework and UI library.
Get ProGalleries
More component examples
8 related galleries, free: open one for its live examples and their code.
Pricing
Badge examples MCP, with Pro
Your AI agent installs any of the 1364 examples, and every component, block and icon, with every Pro plan.
4.9/5 out of 5 · 150+ reviewsfrom 150+ founders and developers.
- Secure checkout via Stripe
- Code lives in your repo
- Keep what you've shipped if you cancel
- License terms
FAQ
Frequently asked questions
A small label next to the thing it describes: a status such as Draft, a tag such as Beta, a count such as 3. shadcn.io's Badge is a `span` with variants, sizes and a `pill` shape, styled with Tailwind CSS. It comes for React on Base UI, React Aria, Ark UI and Radix UI, and for Vue, Svelte and Solid on Ark UI.
Yes. Every example is free to use in personal and commercial projects, with no attribution. Seeing the code and installing it takes a free shadcn.io account.
A Badge labels content and does nothing when clicked, unless it's a link to another page. A Button runs an action. A filter that turns on and off is a Toggle, not a badge.
A badge labels one thing, inline. An Alert describes a region of the page and stays while it's true. A toast reports something that just happened and goes away.
`default` (solid primary) for labels that should stand out, like New. `secondary` for quiet tags and metadata. `outline` for the lightest look, or on a colored surface. `destructive` for errors and failed states. Badge also has `ghost`, `link`, `info`, `success` and `warning`.
Put a Lucide icon before or after the label, with `data-icon="inline-start"` or `data-icon="inline-end"` and `aria-hidden="true"`. The badge sizes and spaces it for you.
Pass `pill` and `size="lg"`: the ends are fully round and the minimum width equals the height, so one digit makes a circle. Show 99+ rather than a long number, and say what is counted for screen readers.
Render it as an anchor so the badge styles land on the link: `asChild` with an `a` inside on Ark UI, Radix UI, Vue, Svelte and Solid, `render` with an `a` on Base UI, and a `render` function that returns an `a` on React Aria.
Sign in with a free account, open the example and run the install command it shows. It adds the example and the Badge component to your project, for your framework and UI library.
Badge has a `size` prop: `sm`, `md` (the default) and `lg`. Keep one size per context so a list or a table reads evenly.
Badge's variants live in the component file you install, in its `badgeVariants` list. Add an entry there with your classes, and drive its colors from theme tokens so dark mode follows.
shadcn.io's Badge, built on Base UI, React Aria, Ark UI or Radix UI in React and on Ark UI in Vue, Svelte and Solid, with Tailwind CSS and Lucide icons.
The badge text is read as part of the surrounding content, so a status label speaks for itself. Icons in the examples are hidden with `aria-hidden`. A bare number needs context: write 3 unread, or set an `aria-label`.
Yes. Each example looks the same on every target. Only the link examples differ, in how each library renders the badge as an anchor.
4.9 out of 5 from 150+ developers
Every badge example. One prompt away.
Every badge example is free with an account. With Pro, your AI agent installs them from a prompt.
Get Pro
















