Badge

ds-badge shows a status in one shared row. Products supply the words, icon and status meaning; DS1 owns the face, type, truncation and independent scale. It is not a button and adds no tab stop. Its width rounds up to whole squares, within the available space. Content, font and surface-scale changes remeasure once per frame while changing; standing idle does not run a measurement loop.

<ds-badge icon="lock">Password on</ds-badge>
<ds-badge icon="archive" icon-only data-tooltip="Archived">Archived</ds-badge>

Keep the status words as children even in icon-only mode. The label remains available to assistive technology; the shared icon is decorative. Without an icon, icon-only falls back to displaying the words. Load the shared tooltip helper to explain compact badges on hover or focus of their containing control.

Set --ds-badge-background and --ds-badge-color with shared colour tokens when a status needs a meaningful colour. The default is neutral. Place a badge inside a shared Button when the containing action is interactive. Products may choose the compact mode from available layout space; do not draw a second chip or resize its internal icon and type. Copy badge through Sync 1.

React products can import Badge from DS1/react/badge, registering the Lit element in the browser before hydration. iconOnly is a boolean property; native attributes, children and the forwarded ref belong to the shared host.

Record states

Icons and short state labels sit beside the content they describe.

Compact status controls

Text badges and icon-only badges use the same compact line.