Pilipinas Interface

Foundation

  • Overview
  • Get Started
  • Colors
  • Typography
  • Icons
  • Layout & Spacing
  • States & Feedback
  • Motion & Transitions
  • Expressions

Components

  • Overview
  • Accordion
  • Alert
  • Avatar
  • Badge
  • Banner
  • Breadcrumb
  • Button
  • Card
  • Checkbox
  • Code Block
  • Combobox
  • Command Menu
  • Dialog
  • Popover
  • Progress
  • Radio Group
  • Scroll Area
  • Select
  • Skeleton
  • Switch
  • Table
  • Tabs
  • Text Field
  • Tooltip

Resources

  • Registry

Components

Badge

A short status label scanned before it is read: application state, a flag, an archived record. It trims a long label with an ellipsis instead of wrapping.

Preview
For reviewPublishedBudget approvedDelinquentTrackingArchived
<Badge color="amber" variant="dot">For review</Badge>
<Badge color="emerald" variant="solid">Published</Badge>
<Badge color="gray" variant="ghost">Archived</Badge>

Usage

A status label scanned before the row is read.

Do and don't

  • Do. Keep the text label and map your own status enum to a color.
  • Don't. Use color alone, or put long sentences in a badge.

Props

  • color; accent gray red orange amber yellow lime green emerald teal cyan blue indigo violet purple fuchsia pink rose. The accent value follows the active accent token.
  • variant="solid" | "dot" | "ghost"; filled tint, outlined with a leading dot, or text only.
  • size="default" | "compact"; 24px or 20px tall. Omit to follow the surrounding size context.

Related

Composes with Table for status columns and Card for record tiles. Status colors are semantic; see Colors before adding a new hue.

← PreviousAvatarNext →Banner

Install

npx shadcn@latest add @pilipinas/badge

For your coding agent