Tag for categories, priorities, or other short attributes. Keep a text label so the meaning does not depend on color. Use Status when you need a state indicator and loading feedback.
Usage
color is required and accepts a theme color or transparent. The default element is always a span, including when a native click handler is supplied. Add a decorative icon with startIcon; the label supplies its accessible meaning.
Variants
soft is the default treatment. solid emphasizes the label, outline adds a border, and ghost removes the background. Use borderStyle="dashed" with outline and weight="medium" for a stronger label.
Colors
Keep the label meaningful without relying on its color. The catalog compares the default soft treatment; the same palette is available to the other variants.Filter by a tag
render. Put its click handler, native attributes, ref, and disabled state on that owner. A real button supplies focus, Enter, and Space activation. Selection state belongs to your application; use aria-pressed for a toggle and a visible treatment for the selected state. For navigation, render a link with its destination, such as <a href="/records" />. Native owners retain Tag’s appearance.
Long labels
By default,truncate={true} truncates constrained string labels and exposes their full text in a tooltip on hover. Set truncate={false} to keep the full label at its natural width without a tooltip, even when its parent is narrower. The parent layout owns wrapping, scrolling, and clipping.
Props
Types and defaults are generated from the public component types. Native attributes and event handlers are also accepted."dashed" | "solid"
default:"solid"
Border style used by the outline variant.
"amber" | "blue" | "bronze" | "brown" | "crimson" | "cyan" | "gold" | "grass" | "gray" | "green" | "iris" | "jade" | "lime" | "mint" | "orange" | "pink" | "plum" | "purple" | "red" | "ruby" | "sky" | "tomato" | "transparent" | "turquoise" | "violet" | "yellow"
required
Theme color for the tag, or
transparent for an unfilled label.MouseEventHandler<HTMLSpanElement>
Native click handler. Does not change the default span or add keyboard activation.
ReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, TagState>
Replaces the default span. Compose a button or link to provide explicit interaction semantics.
ReactNode
Decorative icon before the label. Hidden from assistive technology.
boolean
default:"true"
Truncates constrained string labels and exposes the full text in a tooltip. Set to
false to keep the full label at its natural width without a tooltip, even inside a narrower parent."ghost" | "outline" | "soft" | "solid"
default:"soft"
Visual treatment of the tag background and border.
"medium" | "regular"
default:"regular"
Font weight of the label.