Fine-tune light, shadows, borders, neumorphic
Light and shadows
Borders
Neumorphic
Display

Tag <pm-tag>

Tag / chip. Static label, removable token, or toggleable filter chip (selectable).

Full screen
Design Approved Filter Ada Lovelace

Props

<script type="module"> import '@prismora/css'; import '@prismora/elements/avatar'; import '@prismora/elements/tag'; import { registerIcons } from '@prismora/elements/icon'; import { tag } from '@prismora/icons'; registerIcons([tag]); </script> <pm-tag icon-start="tag">Design</pm-tag> <pm-tag tone="success" removable>Approved</pm-tag> <pm-tag variant="outline" selectable selected>Filter</pm-tag> <pm-tag tone="neutral"> <pm-avatar slot="start" name="Ada Lovelace" size="xs"></pm-avatar> Ada Lovelace </pm-tag>

Variants

Set with the variant attribute.

Design
variant="soft"
Design
variant="solid"
Design
variant="outline"

Sizes

Set with the size attribute; controls keep touch-sized targets on phones.

Design
size="sm"
Design
size="md"
Design
size="lg"

Tones

Set tone on the element, or data-tone on any ancestor to tone a whole area.

Design
tone="accent"
Design
tone="secondary"
Design
tone="neutral"
Design
tone="success"
Design
tone="warning"
Design
tone="danger"
Design
tone="info"

States

Each state is one attribute.

Design
Disabled

Attributes

AttributeTypeDefaultDescription
icon-start
prop: iconStart
string—Registered icon name shown before the content (see registerIcons); a start slot overrides it.
variant'soft' | 'solid' | 'outline'—Visual style.
size'sm' | 'md' | 'lg'—Size: sm, md or lg (md when not set).
removablebooleanfalseShows a remove button; removes the tag unless pm-remove is cancelled.
selectablebooleanfalseToggleable filter chip (button with aria-pressed).
selectedbooleanfalseWhether this item is selected.
disabledbooleanfalseNot interactive (and not submitted, for form controls).
valuestring—Value reported in events (defaults to the text).

Also accepts the contextual attributes tone, surface, radius, density, motion, elevation. They are inherited from ancestors' data-* attributes.

Events

EventReact / Svelte propDescription
pm-removeonPmRemoveRemove button pressed (call event.preventDefault() to keep the tag).
pm-changeonPmChangeFilter chip toggled.

Slots

SlotDescription
(default)Label.
startLeading icon or avatar.

CSS parts

PartDescription
::part(base)The tag.

Used in templates

Customer 360InboxUser profileCreate accountShopping cartLanding page