Theme
Install with your agentnpx shadcn@4.23.1 add @goop/meadow-badge

Badge

Free

A small label with a word, an icon or a count, for a status, a tag, a date or a count beside a title or in a row, for React and Tailwind CSS. Free, MIT.

Switch the variant (each status with its icon), change the words, add a count and change it to see only its changed digits move. Nothing is saved: the badge is drawn live from the panel.

When to use

  • A small label with a word, an icon or a count, for a status, a tag, a date or a count beside a title or in a row.
  • Also called: tag, chip or pill.

Installation

Paste the prompt below into your coding agent. It reads Goop's install steps, installs the part and its tokens once, then reuses this same Badge on every screen instead of drawing a new one: the same height, the same focus ring, the same spacing.

Terminal
npx shadcn@4.23.1 add @goop/meadow-badge
PROMPT
Add the Goop Badge to this project. The install steps are at https://goop.so/docs/install.md

Usage

TSX
import { Badge, BadgeIcon, BadgeLabel, BadgeValue } from '@/components/ui/goop/badge';

function TaskStatuses() {
  return (
    <div className="flex flex-wrap items-center gap-2">
      <Badge variant="plain">
        <BadgeLabel>Nov 30</BadgeLabel>
      </Badge>
      <Badge variant="success">
        <BadgeIcon icon="circle-check" />
        <BadgeLabel>Done</BadgeLabel>
      </Badge>
      <Badge variant="warning">
        <BadgeIcon icon="triangle-alert" />
        <BadgeLabel>Due soon</BadgeLabel>
      </Badge>
      <Badge variant="overdue">Dec 1</Badge>
      <Badge variant="flag">Dec 4</Badge>
      <Badge variant="tag">Note</Badge>
      <Badge>
        <BadgeLabel>Inbox</BadgeLabel>
        <BadgeValue>12</BadgeValue>
      </Badge>
    </div>
  );
}

function PlanMarks() {
  return (
    <div className="flex flex-wrap items-center gap-2">
      <Badge solid>Trial</Badge>
      <Badge solid variant="success">
        Two months free
      </Badge>
      <Badge solid variant="outline">
        Preview
      </Badge>
    </div>
  );
}
  • Fits: list, overview (their recipes); list, record: row.
  • In a Table, give a column of badges the track auto: the column takes its widest badge whole. A fixed track narrower than a badge cuts its words.
  • height, width, padding, gap, corner, background, text: add no class for these.

API reference

Options
OptionTypeWhat it does
variantdefault | outline | plain | flag | overdue | tag | success | warning | destructive | info = default
solid?boolean = falseThe caps pill on a full fill in the variant's colour, words in capitals at the bold weight.
asChild?boolean = falseRender the badge's look on the one child element instead of a span (a link, a button).
stateLabel?stringThe state the badge's colour or mark shows, said to a reader before its words and never painted ("Paid").
Parts
PartWhat it is
BadgeIconThe badge's leading icon; icon: IconName — A pack icon name
BadgeLabelThe badge's words, after an optional BadgeIcon and before an optional BadgeValue
BadgeValueThe badge's count (<BadgeValue>{unread}</BadgeValue>, after its words or alone)
  • Class recipes (cva): badgeVariants (Badge), badgeSolidVariants
  • data-slot values (to select a part by): badge, badge-icon, badge-indicator, badge-label, badge-value

Accessibility

  • focus-visible: the browser's own (:focus-visible): write nothing

Notes for AI

Give your coding agent this page as text instead of screenshots: the parts, the options, the states and the keys. An agent that reads the real part builds the real part, not a lookalike.

goop.so/themes/meadow/components/badge.md · the page as Markdown
Theme
Install with your agentnpx shadcn@4.23.1 add @goop/meadow-badge

Where would you like to start?

Free · now

The Goop plugin

A design system for your AI coding agent, so screen ten matches screen one.

/plugin marketplace add goop-so/skillsthen /plugin install goop@goopCodex, Cursor, ChatGPT, the Claude app and more: Connect Goop
FreePro

The components

Every part live, with its props, its keys and what an agent sees. Whole page and app templates, working with sample data.