--- title: Badge description: "`Badge` is a component that emphasizes the status of an item to make it immediately recognizable." links: - style: https://github.com/yamada-ui/yamada-ui/tree/main/packages/react/src/components/badge/badge.style.ts - source: https://github.com/yamada-ui/yamada-ui/tree/main/packages/react/src/components/badge - storybook: https://yamada-ui.github.io/yamada-ui?path=/story/components-badge--basic --- ```tsx Badge ``` ## Usage ```tsx import { Badge } from "@yamada-ui/react" ``` ```tsx import { Badge } from "@/components/ui" ``` ```tsx import { Badge } from "@workspaces/ui" ``` ```tsx ``` ### Change Variant ```tsx {(variant, index) => ( {variant} )} ``` ### Change Size ```tsx {(size, index) => ( {size} )} ``` ### Change Color Scheme ```tsx {(colorScheme, index) => ( {colorScheme} )} ``` ## Props | Prop | Default | Type | Description | | ------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------- | | `as` | - | `As` | The HTML element to render. | | `asChild` | - | `boolean` | Merges its props onto its immediate child. | | `css` | - | `CSSObject \| CSSObject[]` | The CSS object. | | `colorScheme` | - | `"amber" \| "black" \| "blackAlpha" \| "blue" \| "cyan" \| "danger" \| "emerald" \| "error" \| "flashy" \| "fuchsia" ...` | Set color scheme variables. | | `size` | `"sm"` | `"lg" \| "md" \| "sm"` | The size of the component. | | `variant` | `"outline"` | `"outline" \| "solid" \| "subtle" \| "surface"` | The variant of the component. | | `fullRounded` | `false` | `boolean` | If `true`, the button is full rounded. Else, it'll be slightly round. |