Command Palette

Search for a command to run...

Badge

Displays a badge or a component that looks like a badge.

Installation

pnpm dlx shadcn@latest add https://dga-registry.vercel.app/r/badge.json

Variants

VariantDescription
defaultPrimary badge
secondarySecondary style
destructiveDangerous / error state
outlineBordered badge
ghostNo background
linkStyled as a link
DefaultSecondaryDestructiveOutlineGhostLink

Chip Variants

DGA-specific chip styles for selection and filtering contexts.

VariantDescription
chip-primaryPrimary chip
chip-primary-selectedPrimary chip (selected)
chip-neutralNeutral chip
chip-neutral-selectedNeutral chip (selected)
Primary ChipPrimary Selected
Neutral ChipNeutral Selected

Sizes

SizeDescription
defaultInline text badge
sm20px height
md24px height
lg32px height
DefaultSmallMediumLarge

With Icons

Badges with leading or trailing icons.

Approved Info Error Featured
Next Remove

As Link

Use asChild to render the badge as an anchor or any other element.

Props

PropTypeDefaultDescription
variantstring"default"Visual style variant
sizestring"default"Badge size
asChildbooleanfalseMerge props onto child element
classNamestringAdditional CSS classes