Components

Badge

In progressIn reviewComplete
<Flex gap="2">
<Badge color="orange">In progress</Badge>
<Badge color="blue">In review</Badge>
<Badge color="green">Complete</Badge>
</Flex>

API Reference

This component is based on the span element and supports common margin props.

PropTypeDefault
size
Responsive<"1" | "2">
"1"
variant
"solid" | "soft" | "surface" | "outline"
"soft"
color
enum
No default value
highContrast
boolean
No default value
radius
"none" | "small" | "medium" | "large" | "full"
No default value

Examples

Size

Use the size prop to control the size.

NewNew
<Flex align="center" gap="2">
<Badge size="2" color="indigo">
New
</Badge>
<Badge size="1" color="indigo">
New
</Badge>
</Flex>

Variant

Use the variant prop to control the visual style.

NewNewNewNew
<Flex gap="2">
<Badge variant="solid" color="indigo">
New
</Badge>
<Badge variant="soft" color="indigo">
New
</Badge>
<Badge variant="outline" color="indigo">
New
</Badge>
<Badge variant="surface" color="indigo">
New
</Badge>
</Flex>

Color

Use the color prop to assign a specific color, ignoring the global theme.

NewNewNewNew
<Flex gap="2">
<Badge color="indigo">New</Badge>
<Badge color="cyan">New</Badge>
<Badge color="orange">New</Badge>
<Badge color="crimson">New</Badge>
</Flex>

High-contrast

Use the highContrast prop to increase color contrast with the background.

NewNewNewNew
NewNewNewNew
<Flex direction="column" gap="2">
<Flex gap="2">
<Badge variant="solid">New</Badge>
<Badge variant="soft">New</Badge>
<Badge variant="outline">New</Badge>
<Badge variant="surface">New</Badge>
</Flex>
<Flex gap="2">
<Badge variant="solid" highContrast>
New
</Badge>
<Badge variant="soft" highContrast>
New
</Badge>
<Badge variant="outline" highContrast>
New
</Badge>
<Badge variant="surface" highContrast>
New
</Badge>
</Flex>
</Flex>

Radius

Use the radius prop to assign a specific radius value, ignoring the global theme.

NewNewNew
<Flex gap="2">
<Badge variant="solid" radius="none" color="indigo">
New
</Badge>
<Badge variant="solid" radius="large" color="indigo">
New
</Badge>
<Badge variant="solid" radius="full" color="indigo">
New
</Badge>
</Flex>
PreviousAvatar
NextButton