Binhlaig UI Component
Badge
Displays compact labels, statuses and categories with multiple color variants and sizes.
Installation
Initialize Binhlaig UI and install Badge with your preferred installer.
Initialize first
npx binhlaig-ui@latest initTerminal
npx binhlaig-ui@latest add badgeImport
Import Badge from your UI component directory.
import { Badge } from "@/components/ui/badge"Usage
Use Badge to display a compact label.
Default
Variants
Choose a semantic color that matches the badge meaning.
DefaultSecondaryOutlineDestructiveSuccessWarningInfoGhost
Sizes
Badge includes small, default and large sizes.
SmallDefaultLarge
With Icons
Add a small icon before the badge label.
NewCompletedUpdatedFeatured
Update or Overwrite
Replace an older Badge source with the latest registry version.
npx binhlaig-ui@latest add badge --overwriteAPI Reference
Supported Badge variants and sizes.
| Prop | Values | Default |
|---|---|---|
variant | default, secondary, outline, destructive, success, warning, info, ghost | default |
size | sm, default, lg | default |