Skip to content

Tag

Use Tag to display a compact piece of message text, such as a status or filter label. Pass plain text with label, or pass children to render your own markup. The component renders nothing when you provide neither.

The SDK Tag showing a compact status label.
import { Tag } from '/@dropins/tools/components.js';
PropTypeReq?Description
labelstringNoCustom text to display. Ignored when children is set.
childrenVNode | VNode[]NoContent to render instead of the label.

Tag also accepts standard HTML attributes (for example, className), except onChange and icon.

import { Tag, provider } from '/@dropins/tools/components.js';
await provider.render(Tag, { label: 'Shipping' })(document.querySelector('.tag'));
  • Icon — render an icon inside a tag through children.
  • Design tokens — the colors, spacing, and typography the tag uses.