Prodular UI

Badge

A compact label for status, counts and metadata, with tinted status variants, a status dot and an AI variant.

npx prodular-ui add badge

Variants

Neutral variants for metadata. Tinted status variants for state.

EnterpriseDraftv2.14.0ArchivedChangelog
PaidScheduledPast dueFailed

Status dot

BadgeDot takes the badge color. In a neutral badge, pass status to color only the dot.

OperationalDegradedOutageMaintenance
LivePending reviewPaused

AI

Marks content a model produced. Tinted with the AI hairline.

AI summarySuggestedDrafted

Sizes

sm for dense tables and inline text, default everywhere else.

12 openVerifiedSynced
12 openVerifiedSynced

Anatomy

<Badge variant="success">  <BadgeDot />  Operational</Badge>

Guidance

Use it when

  • Show the state of a record: Paid, Past due, Failed, Live.
  • Show short metadata next to a title: a version, a plan, a count.
  • Use the ai variant on content a model wrote or suggested, so people can tell it apart from their own.

Avoid

  • Badges as buttons. If clicking it does something, use a Button or a Toggle.
  • More than one or two badges per row in a table. Pick the one that matters.
  • default (solid) badges for status. Solid fills are loud. Keep them for one highlighted label, such as a plan name.

Rules for AI agents

Published in llms-full.txt, the registry and the MCP server, so coding agents follow them when they build with this component.

  • Map status to variant consistently: success for completed or healthy, warning for needs attention, destructive for failed or blocked, info for scheduled or neutral system states.
  • Use BadgeDot for live or ongoing states (Operational, Building). Add pulse only while the state is actively changing.
  • Inside outline or secondary badges, set BadgeDot status to color the dot. Never color the badge text yourself.
  • Use size="sm" inside table cells and next to 14px text. Use the default size next to headings.
  • Keep badge text to one or two words in sentence case. No uppercase.
  • Use the ai variant only for model output, never for features that merely mention AI.

API

Badge

PropTypeDefaultDescription
variant"default" | "secondary" | "outline" | "ghost" | "link" | "success" | "warning" | "info" | "destructive" | "ai""default"Visual style. Status variants are tinted.
size"sm" | "default""default"Height: 20px or 24px.
renderReactElementRenders the badge as another element, for example a link.

BadgeDot

PropTypeDefaultDescription
status"success" | "warning" | "info" | "destructive" | "ai" | "neutral"Dot color. Defaults to the badge variant color.
pulsebooleanfalseAdds a pulsing ring for live states. Hidden with reduced motion.

Installation

The Prodular UI CLI adds the source to components/ui with everything it depends on. In a project that already uses shadcn/ui, the shadcn CLI installs it from the Prodular registry too. See Installation for the first setup.

npx prodular-ui add badge# or, with the registry in components.jsonnpx shadcn@latest add @prodular/badge