⌘ K

Badge

Compact status labels and contextual indicators.

Interactive playground

LIVE PREVIEW
In review

Props

Status appearance.

Badge size.

Show a status dot.

Surface treatment.

Use tabular digits.

Badge label.

Generated code
import { Badge } from '@vrum/ui';

<Badge
  variant={"default"}
  size={"sm"}
  dot={false}
  badgeStyle={"default"}
  numeric={false}
>
  {"In review"}
</Badge>
Copy code

Badge props

PropTypeDefaultDescription
variantBadgeVariant"default"Status appearance.
size"sm" | "md" | "lg""sm"Badge size.
dotbooleanfalseShow a status dot.
badgeStyle"outline" | "default" | "reversed""default"Surface treatment.
numericbooleanfalseUse tabular digits.
iconLeftReact.ReactNodenoneicon left configuration.
iconRightReact.ReactNodenoneicon right configuration.
onDelete(() => void)noneon delete configuration.
deleteLabelstring"Remove badge"delete label configuration.
dropdownOptionsBadgeOption[]nonedropdown options configuration.
dropdownValuestringnonedropdown value configuration.
onDropdownChange((value: string) => void)noneon dropdown change configuration.
asChildbooleanfalseas child configuration.
defaultCheckedbooleannonedefault checked configuration.
defaultValuestring | number | readonly string[]noneInitial value for an uncontrolled component.
autoFocusbooleannoneauto focus configuration.
classNamestringnoneAdditional CSS classes.
idstringnoneid configuration.
styleCSSPropertiesnoneInline style overrides.
aria-invalidboolean | "false" | "true" | "grammar" | "spelling"noneIndicates the entered value does not conform to the format expected by the application.
aria-labelstringnoneDefines a string value that labels the current element.
childrenReactNodenoneBadge label.
onFocusFocusEventHandler<HTMLDivElement>noneon focus configuration.
onBlurFocusEventHandler<HTMLDivElement>noneon blur configuration.
onChangeChangeEventHandler<HTMLDivElement, Element>noneCalled when the input value changes.
onSubmitSubmitEventHandler<HTMLDivElement>noneCalled when the form is submitted.
onKeyDownKeyboardEventHandler<HTMLDivElement>noneon key down configuration.
onClickMouseEventHandler<HTMLDivElement>noneCalled when the control is activated.
onSelectReactEventHandler<HTMLDivElement>noneon select configuration.