Skip to content
Storybook

Tag

Neutral label for categories, applied filters and user-entered values. Optional dot, count and close.

Preview

React · live from the Storybook

HTML and CSS

The same component as plain HTML with pixels-ui.css, no framework needed.

Design Online Reviews 12 Figma

Usage

  • Use Chips for filters people toggle; Tags for values that exist.

Installation

Included in the core files. No extra install.

HTML
<link rel="stylesheet" href="/css/pixels-tokens.css">
<link rel="stylesheet" href="/css/pixels-ui.css">
<script src="/js/pixels-ui.js" defer></script>

Examples

Sizes

SmallMediumLarge

API reference

Class / attributeTypeDescription
px-tagclassSmall by default.
px-tag--md · --lgclassSize.
px-tag__closeclassClose button (needs aria-label “Remove <label>”).

Figma properties

Tag12 variants · page “Tags”Open

Neutral label for categories, applied filters and user-entered values (e.g. in a multi-select). Optional checkbox, status dot, count and close button. Close needs aria-label="Remove <label>…

PropertyTypeValues
LabelText“Label”
CheckboxBoolean—
DotBoolean—
CountBoolean—
CloseBoolean—
SizeVariantSmall Medium Large
StateVariantActive Hover Focused Disabled

Design tokens

Component tokens from the Figma Component collection. Override them to restyle just this component.

TokenAliasLight value
--px-tag-backgroundcolor-surface-default#ffffff
--px-tag-bordercolor-border-neutral-default#eaecf0
--px-tag-contentcolor-content-neutral-secondary#475467
--px-tag-iconcolor-content-neutral-placeholder#667085
--px-tag-radiusradius-sm4px
--px-tag-gapspacing-xs4px

Accessibility

  • Close needs aria-label="Remove <label>".