A stylized badge element.
<Flex gap="2">
<Badge color="orange">In progress</Badge>
<Badge color="blue">In review</Badge>
<Badge color="green">Complete</Badge>
</Flex>
This component is based on the span
element and supports common margin props.
Use the size
prop to control the size.
<Flex align="center" gap="2">
<Badge size="2" color="indigo">
New
</Badge>
<Badge size="1" color="indigo">
New
</Badge>
</Flex>
Use the variant
prop to control the visual style.
<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>
Use the color
prop to assign a specific color, ignoring the global theme.
<Flex gap="2">
<Badge color="indigo">New</Badge>
<Badge color="cyan">New</Badge>
<Badge color="orange">New</Badge>
<Badge color="crimson">New</Badge>
</Flex>
Use the highContrast
prop to increase color contrast with the background.
<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>
Use the radius
prop to assign a specific radius value, ignoring the global theme.
<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>