Bedform UIMessages

Tag

Display a single-line label.

Tag

New
*
string
*
boolean
*

Usage

import { Tag } from "@bedform/ui/tag";

export function Status() {
  return <Tag variant="primary">New</Tag>;
}

Variants

<Tag>Neutral</Tag>
<Tag variant="secondary">Secondary</Tag>
<Tag variant="primary">Primary</Tag>
<Tag variant="informative">Info</Tag>
<Tag variant="notice">Notice</Tag>
<Tag variant="warning">Warning</Tag>
<Tag variant="realms-informative">Realms</Tag>

Add outlined to add a visible border to the label.

<Tag outlined>Outlined</Tag>

API

Tag renders a span, accepts every span attribute, and forwards its ref to it.

PropTypeDefault
variant"neutral" | "secondary" | "primary" | "informative" | "notice" | "warning" | "realms-informative""neutral"
outlinedbooleanfalse

CSS variables

VariablePurpose
--ore-tag-unitBase size unit
--ore-tag-backgroundLabel background
--ore-tag-foregroundLabel text color
--ore-tag-borderOutline color

On this page