Installation
npx shadcn@latest add @iconiq/badgeProps
Badge
Compact label pill with a shimmer-enabled default variant, a quieter dot variant, and preset color tokens.
childrenReactNodeRequired
classNamestringDefault ""
variant"default" | "dot"Default "default"
size"sm" | "md" | "lg"Default "md"
colorBadgeColorDefault "gray"
waveColorstringThe component now spreads remaining span props, so ids, data attributes, and click handlers can be attached directly.
badgeVariants
CVA recipe exported alongside Badge for reusing badge styling on custom elements.
variant"default" | "dot"Default "default"
size"sm" | "md" | "lg"Default "md"
colorBadgeColorDefault "gray"
classNamestringbadgeColors
Preset color token map used by Badge and badgeVariants for palette-consistent fills and dot treatments.
keysBadgeColorUse the exported BadgeColor type when you want compile-time checks for supported palette tokens.
Visual behavior
The default variant keeps the original spring-in shimmer treatment, while the dot variant adds a subtle status pulse.
The default badge fades and scales from 0.95 to 1 on mount over 0.3 seconds.
Its shimmer travels from left to right over 2 seconds, waits 1.5 seconds, then repeats indefinitely.
The dot variant omits the shimmer layer, sizes its leading status dot to match the chosen badge size, and gives it a gentle repeating blink.
Registry bundle
Install the exact registry entry shown on the right when you want the component file and its declared runtime dependencies together.
Dependencies: motion, class-variance-authority.