Binhlaig UI Component
Badge
Displays compact labels, statuses and categories with multiple color variants and sizes.
Installation
Install Badge in your project.
Terminal
npx binhlaig-ui@latest add badgeFor project setup, installer selection, dependencies, and advanced installation instructions, see the Installation Guide.
View Installation Guide →Update or Overwrite →Import
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
API Reference
Supported Badge variants and sizes.
| Prop | Values | Default |
|---|---|---|
variant | default, secondary, outline, destructive, success, warning, info, ghost | default |
size | sm, default, lg | default |