Badge

Status and count chip with a dot, icons and an optional remove button.

Source
1 file
Dependencies
none
Playground
yes

Examples

Every variant of the shipped component, live. Switch the layout to read them as a table or one at a time, and open Code for the file behind them.

01Variant
DefaultSecondaryOutlineDestructiveSuccessWarningInfo
02Appearance
SolidSoftOutlineSoft dangerOutline info
03Size
SmallMediumLarge
04Rounded
SmMdLgFull
05Dot & icon
OnlineAwayBusyVerifiedDetails
06Count
89920+3
07Removable
DesignEngineeringMarketing

Installation

One package for the whole library — run this once and every component on this site is importable. Adding the tokens to your stylesheet is the other half; the installation guide covers it.

npm install kipui
import { Badge } from "kipui";
Peer dependencies

react 19

react-dom 19

tailwindcss 4

Bundled dependencies

None beyond the peers above.

Usage

badge-example.tsx
import { Badge } from "kipui";

<Badge variant="success" appearance="soft" dot>
  Active
</Badge>
  • `onRemove` turns the badge into a chip with a real button — give it `removeLabel` when the text alone isn't a good accessible name.

Playground

Change the props and the snippet underneath updates with them.

Preview

<Badge />
Active

Props

5
<Badge
  variant="success"
  appearance="soft"
  size="md"
  rounded="default"
  dot
>
  Active
</Badge>

API reference

Transcribed from the component's own types. Props with no default are required.

PropDefaultDescription
variant"default" | "secondary" | "outline" | "success" | "warning" | "destructive" | "info""default"Semantic colour.
appearance"solid" | "soft" | "outline""solid"Surface treatment.
size"sm" | "md" | "lg""md"Height and type scale.
rounded"default" | "full" | "none""default"Corner radius.
dotbooleanfalseLeading status dot in the variant colour.
startIconReactNoderequiredLeading icon.
endIconReactNoderequiredTrailing icon.
onRemove() => voidrequiredRenders a remove button and calls back on click.
removeLabelstringrequiredAccessible label for the remove button.