Badge
Used to highlight an item's status for quick recognition.
AI TipWant to skip the docs? Use the MCP Server
DefaultSuccessRemovedNew
Usage
import { Badge } from "@chakra-ui/react"<Badge>Badge</Badge>Examples
Icon
Render an icon within the badge directly
NewNew
Variants
Badges come in different variants
OutlineSolidSubtleSurface
Sizes
Badges come in different sizes
NewNewNewNew
Props
| Prop | Default | Type |
|---|---|---|
colorPalette | gray | 'gray' | 'red' | 'orange' | 'yellow' | 'green' | 'teal' | 'blue' | 'cyan' | 'purple' | 'pink'The color palette of the component |
variant | subtle | 'solid' | 'subtle' | 'outline' | 'surface' | 'plain'The variant of the component |
size | sm | 'xs' | 'sm' | 'md' | 'lg'The size of the component |
as | React.ElementTypeThe underlying element to render. | |
asChild | booleanUse the provided child element as the default rendered element, combining their props and behavior. For more details, read our Composition guide. |