Skip to content

Tag

STag is a reusable chip: a compact label with an optional remove button. It is composed on top of SBadge (visuals) and SIcon (the cross). It is used on its own and as the tag element inside SInput (use-tags) and SSelect (use-tags).

Variants

Inherits the SBadge palette: the neutral and semantic variants.

NeutralPrimaryPositiveWarningNegative

Sizes and icon

size is sm or md; icon draws a leading icon (a registry name).

smmdFavorite

Removal

The removable flag adds a cross button; clicking it emits the remove event. The button's accessible name comes from the locale dictionary (removeTag) or is set with the remove-label prop.

VueNuxtReka UI

Color

The color prop sets a color from the palette and overrides the variant color.

indigoblue-greysoft deep-purplecyan

API

Props

NameTypeDefaultDescription
variant | "primary" | "positive" | "negative" | "warning" | "neutral""neutral"Color variant: neutral or semantic (primary/positive/warning/negative).
colorstringundefinedAccent color: a name from the palette (primary/teal/teal-10). Overrides the variant color.
text-colorstringundefinedText/icon color on the fill: a name from the palette. White by default.
size"md" | "sm" | "lg""md"Size: sm, md, or lg.
squarebooleanundefinedSquare corners: removes the rounding (rounded by default).
iconstringundefinedLeading icon: a registry name or a raw SVG path.
removablebooleanfalseShows a remove button (a cross). Emits remove on click.
remove-iconstring"x"Remove button icon: a registry name or a raw SVG path.
remove-labelstringundefinedAccessible name of the remove button (taken from the locale dictionary by default).

Events

NameSignatureDescription
remove() => voidClick on the built-in remove button.

Slots

NameDescription
defaultTag content (text).
removeCustom remove control instead of the built-in button, e.g. Reka TagsInputItemDelete when the tag is used inside an input.