Tag is a small, static label — one short line of text on a rounded, blended surface. Use it to mark or qualify adjacent content, such as a “Beta” marker after a title. It owns its padding, its text style, its corner geometry, and the blend that lets it sit over varied backgrounds.Tag is built on StaticContainer, so it has no interaction states and inherits that component’s material, shape, and sizing contract.trailingTag prop, whose label comes from the closed TrailingTag enum — you do not place a Tag inside either of them yourself.import { Tag, TextStyle, TextView } from '@wearables-ui-toolkit/mrbd';
export function SectionTitle({ title }: { title: string }) {
return (
<div className="section-title">
<TextView textStyle={TextStyle.HEADING2}>{title}</TextView>
<Tag text="Beta" />
</div>
);
}
.section-title {
display: flex;
align-items: center;
gap: var(--uit-spacing-small);
}
.metadata-stack {
display: flex;
flex-direction: column;
align-items: flex-start;
gap: var(--uit-spacing-xsmall);
}
{feature.qualifier != null ? <Tag text={feature.qualifier} /> : null}
contentStyle for caller content padding and style for outer placement or composition. Tag keeps its whole-layer screen blending on the root; its text inset belongs to the shared content layout.TagProps. It extends StaticContainerProps with children omitted — the copy comes from text.| Prop | Type | Default | Description |
|---|---|---|---|
text | string | — | The label copy. Nothing is rendered inside the tag when it is empty or omitted; the material still paints. |
| Prop | Type | Default | Description |
|---|---|---|---|
material | ContainerMaterial | the default static material | Material used for the background and stroke layers. |
shapeProvider | ShapeProvider | the default shape provider | Geometry used for clipping and every material path. |
backgroundStyle | BackgroundStyle | BackgroundStyle.PRIMARY | Whether the material renders and in which treatment. NONE hides it; SECONDARY swaps in the secondary static material. |
visualState | VisualState | VisualState.DEFAULT | Static visual state handed to the material. It adds no interaction behavior. |
width | number \| string | 'auto' | Explicit width. Leave it unset so the tag sizes to its content. |
height | number \| string | 'auto' | Explicit height. Leave it unset. |
contentClip | 'shape' \| 'bounds' \| 'none' | 'shape' | Clips the text to the tag’s shape. |
useSmoothCorners | boolean | true | Render smooth (squircle) corners once the tag has been measured. |
contentClassName | string | '' | Extra class on the inner content wrapper. |
className | string | '' | Extra class appended to the tag’s own root class. |
style | ContainerRootStyle | — | Outer placement and whole-tag composition, without content padding. |
contentStyle | ContainerContentStyle | — | Content layout and padding styles, merged over the tag’s defaults. |
div attributes — including data-*, aria-*, role, and event handlers — are forwarded to the root element, and ref resolves to that root div.uit-text-meta3 appearance in --uit-color-text-primary, on a single line that never wraps, truncates, or shows an ellipsis. Long copy therefore makes the tag wider instead of clipping; keep it short.text renders the material with no inner text element. Prefer conditionally rendering the tag over passing an empty string.screen blend, so it reads clearly over the content behind it without over-brightening on the additive light display.onClick handler forwards the DOM event but does not make the tag keyboard-operable.Tag sets no role, no accessible name, and no tabIndex of its own.trailingTag prop that Button and ListItem already provide instead of placing a Tag inside them.Tag rather than imitating it with a custom rounded rectangle. Its padding and text treatment are component-owned.Container, StaticContainer, or Surface.children; the type omits them and only text is rendered.Button or Chip when the element needs to do something or represent live state.