Badge

The <vara-badge> component renders a compact status label.

Usage

<vara-badge text="Beta" color="info" />

Preview

Beta

Props

PropTypeDefaultDescription
textstring""Badge text. Falls back to slot content.
sizestring"md"One of: sm, md, lg.
variantstring"soft"One of: soft, solid, outline.
colorstring"neutral"One of: neutral, info, success, warning, error.
classstring""Additional CSS classes.

Variants

Soft

Default Info Success

Solid

Warning Error

Outline

Neutral Info

Sizes

Small Medium Large

With a slot

Provide a text prop or put the label between the tags. Both are equivalent:

<vara-badge color="success">New</vara-badge>