Skip to content

Tag

Pro

A small, static label for a status or category: Sold, Open now, Featured. Tonal, filled or outlined, in M3, success and warning colours. Not an M3 component (@windmorph/react-pro).

import { Tag, TagGroup } from '@windmorph/react-pro';

Part of Windmorph Pro, paid components on the free core, not on sale yet. See the Pro guide for what it includes and to register interest.

Purpose

A tag is a small, static label about the thing beside it: a status (Sold, Open now), a category (Full-time) or a quality (Featured). It never does anything when pressed. It is not an M3 component: it comes from @windmorph/react-pro and is built from M3's colour roles, type scale and shape scale, with its own component tokens.

A short form (fullLabel) or a label cut at maxWidth shows its full text in the core's plain tooltip, on hover, keyboard focus or a long press; only such a tag takes focus, and a small one gets a 24px touch target for it.

Tag, badge or chip?

  • Tag: a word or two about an item, that does nothing when pressed.
  • Badge: a count or a dot on an icon or an avatar (unread messages, new activity).
  • Chips: interactive. Assist and suggestion chips act, filter chips filter, input chips are entered values. A tag styled as a chip would be focusable and read as a button.

When not to use

For something pressable use a chip; for a count on an icon or avatar use a Badge.

See also

  • Badge: A small dot or a short count or label, placed on an anchor with BadgedBox.
  • Chips: Assist, suggestion, filter and input chips for compact actions and entries, in a chip set.