Select UI framework
Get Started
Radix UI
AlertApp Store ButtonAspect RatioBadgeBannerBreadcrumbButton GroupButtonCheckboxCommand MenuCompactButtonDialogDrawerDropdown MenuEmptyFancy ButtonFile UploadHintInput OTPInputItemKbdLabelLinkButtonLoaderPopoverProgress BarProgress CircleRadio GroupRatingSelectSeparatorSkeletonSliderSocial ButtonSwitchTagTextareaToggle GroupToggleTooltip
Component badge-demo not found in registry.
Installation
pnpm dlx shadcn@latest add badge
Usage
import * as Badge from "@/components/ui/badge"<Badge.Root variant="filled" color="blue">
Badge
</Badge.Root>Examples
Sizes
Component badge-sizes not found in registry.
Colors
Component badge-colors not found in registry.
With Icon
Component badge-with-icon not found in registry.
With Dot
Component badge-with-dot not found in registry.
Circle
Component badge-circle not found in registry.
Closable
Component badge-closable not found in registry.
Disabled
Component badge-disabled not found in registry.
Props
Badge.Root
This component is based on a <span> element and supports all of its props.
Prop
Type
Default
variant
primarysecondarydangersuccesswarningprimary
appearance
filledborderedmutedghostfilled
size
xssmmdlgmd
circle
booleanfalse
disabled
booleanfalse
asChild
booleanfalse
className
string-
children
ReactNode-