Badge

Badges are used to highlight an item's status for quick recognition.

chakra ui pro

Import#

import { Badge } from "@chakra-ui/react"

Usage#

Default
Editable Example

Badge Color#

Pass the colorScheme prop to customize the color of the Badge. colorScheme can be any color key that exists in theme.colors. Learn more about theming.

DefaultSuccessRemovedNew
Editable Example

Badge Variants#

Pass the variant prop and set it to either subtle, solid, or outline to get a different style.

DefaultSuccessRemoved
Editable Example

Composition#

Segun Adebayo New

UI Engineer

Editable Example

You can also change the size of the badge by passing the fontSize prop.

Segun Adebayo New

Editable Example

Props#

The Badge component composes Box component so you can pass props for Box.

NameTypeDescriptionDefault
colorScheme"blue" | "cyan" | "gray" | "green" | "orange" | "pink" | "purple" | "red" | "teal" | "yellow" | "whiteAlpha" | "blackAlpha" | "linkedin" | "facebook" | "messenger" | "whatsapp" | "twitter" | "telegram""gray"
sizestringSizes for Badge are not implemented in the default theme. You can extend the theme to implement them.-
variant"outline" | "solid" | "subtle""subtle"