Skip to content

Badge

Overview

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

Theme entry: Badge

Props

NameTypeRequiredDefaultDescription
themeOverrideString|Object|ArraynullA partial theme object merged with the component's default theme; accepts a class string, class array, or theme object.
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

Documents matching: server v3.0.0a1.post1client v3.0.0-alpha.2