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 init
Terminal
npx binhlaig-ui@latest add badge

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

Update or Overwrite

Replace an older Badge source with the latest registry version.

npx binhlaig-ui@latest add badge --overwrite

API Reference

Supported Badge variants and sizes.

PropValuesDefault
variantdefault, secondary, outline, destructive, success, warning, info, ghostdefault
sizesm, default, lgdefault