Badge
The badge is a visual indicator to highlight an item's status for quick recognition.
Import
Importimport { Badge } from '@backyard-ui/core';Usage
UsageAppearance
AppearanceUse the appearance prop to change the visual semantic of the Badge.
Variants
VariantsBy default variant prop is solid but you can use subtle to get a different style.
Icon
IconCurrently we support icon only on left side.
API Reference
API Reference- colorDescription The badge colorType
"orange" - children requiredDescription The children elementsType
ReactNode - appearanceDescription The badge appearanceType
"success" | "critical" | "info" | "warning" | "neutral" | "primary" | "secondary" | "tertiary"Defaultprimary - variantDescription The variant is used to change the visual communicationType
"solid" | "subtle"Defaultsolid - iconLeftDescription Icon rendered on the left side of labelType
ReactNode - iconRightDescription Icon rendered on the right side of labelType
ReactNode - isFullWidthDescription Set `width` to 100%Type
boolean