Skip to content

Badge ​

Overview ​

A badge component built on Reka UI's Primitive, supporting variant styles.

Theme entry: Badge

Props ​

NameTypeRequiredDefaultDescription
themeOverrideObjectnullA partial ThemeObject keyed by component name, merged over this component's theme and provided to descendants.
variant('default'|'secondary'|'destructive'|'outline'|'info'|'success'|'warning')undefinedVisual style variant. default, secondary, and destructive render a solid fill; outline renders a bordered chip; info, success, and warning render a tinted status surface. Status supplied by the application or server is what a badge presents; it is never an authorization signal.
numericbooleanfalseRender as a numeric badge (count / digit). Switches to a fixed-width mono recipe so single-, double-, and triple-digit values align across rows.
classimport('vue').HTMLAttributes['class']undefinedAdditional CSS classes to apply to the root element.
asstring|objectundefinedThe element or component to render as.
asChildbooleanfalseWhen true, merges props onto the child element instead of rendering a wrapper.

Slots ​

default ​

Slot.

Source ​

client/lib/display/badge/Badge.vue