DocsComponents

Badge

Badge

A styled badge.

Badge

Installation

CLI

Add component to your project.

npx @perceptui/cli@latest add badge

Import from @perceptui/ui

Note: If you have installed @perceptui/ui package, then import Badge from @perceptui/ui.

import { Badge } from "@perceptui/ui";
Badge

API References

PropTypeDescriptionDefault
variant"solid" | "outline" | "soft"Form of the Badgesolid
colorstringColor of the Badgeblue
radius"none"|"sm"|"md"|"lg"|"xl"|"full"Radius of the Badgenone
classNamestringclassName_

Examples

Variant

Use the variant prop to control the visual style of the Badge.

Solid Variant

Badge

Outline Variant

Badge

Soft Variant

Badge

Color

Use the color prop to control the color of the Badge.

Color with solid variant

Badge
Badge
Badge
Badge
Badge
Badge
Badge
Badge
Badge
Badge
Badge
Badge
Badge
Badge
Badge
Badge
Badge

Color with outline variant

Badge
Badge
Badge
Badge
Badge
Badge
Badge
Badge
Badge
Badge
Badge
Badge
Badge
Badge
Badge
Badge
Badge

Color with soft variant

Badge
Badge
Badge
Badge
Badge
Badge
Badge
Badge
Badge
Badge
Badge
Badge
Badge
Badge
Badge
Badge
Badge
There are more color properties. Take your time to explore

Radius

Use the radius prop to assign a specific radius value.

Badge
Badge
Badge
Badge
Badge
Badge
Badge