DocumentationComponents

Badge

Badge

A styled badge.

Start using via importing:

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

API References

PropTypeDescriptionDefault
variant"solid" | "outline" | "ghost"Form of the Badgesolid
colorstringColor of the Badgeblue
radius"none"|"sm"|"md"|"lg"|"xl"|"full"Radius of the Badgenone
size"xs"|"sm"|"md"|"lg"|"xl"Size of the Badgexs
classNamestringclassName_

Examples

Variant

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

Badge
Badge
Badge
<Badge variant="solid">Badge</Badge>
<Badge variant="outline">Badge</Badge>
<Badge variant="ghost">Badge</Badge>

Color

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

Badge
Badge
Badge
Badge
Badge
Badge
<Badge color="blue">Badge</Badge>
<Badge color="emerald">Badge</Badge>
<Badge color="gray">Badge</Badge>
<Badge color="rose">Badge</Badge>
<Badge color="cyan">Badge</Badge>
<Badge color="yellow">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 radius="none">Badge</Badge>
<Badge radius="sm">Badge</Badge>
<Badge radius="md">Badge</Badge>
<Badge radius="lg">Badge</Badge>
<Badge radius="xl">Badge</Badge>
<Badge radius="full">Badge</Badge>

Size

Use the size prop to assign a specific size value.

Badge
Badge
Badge
Badge
Badge
<Badge size="xs">Badge</Badge>
<Badge size="sm">Badge</Badge>
<Badge size="md">Badge</Badge>
<Badge size="lg">Badge</Badge>
<Badge size="xl">Badge</Badge>