Passer au contenu principal

Tag

Implemented

Removable label chip — used in filter bars, multi-select displays, taxonomy. Has a × button with aria-label='Remove {label}'.

Categoryatoms
Sourcepatterns/atoms/tag.html
AI HintCategorical label chip in neutral/brand/success/warning/error variants with an optional removable onRemove (44px hit area). Use for static categories; use Chip for interactive filter selection. For a compact solid label naming WHAT KIND of thing something is (e.g. the 'Pass' / 'Package' kind pill on a TicketSelector card) use size='pill' — never hand-roll a rounded span with a tint background.

Static label for taxonomy, genre, or category metadata. FR-CA: Étiquette de taxonomie statique.

Tag

Display atom (Family 2 — Tier 1)

For interactive filter chips use Chip. For numeric counts use Badge.

ConcertMarqueConfirméEn attenteAnnuléPetit

This component supports light and dark mode.

Usage

import { Tag } from '@epasslive/design-system'

<Tag label="Concert" variant="brand" />
<Tag label="VIP" variant="success" size="sm" />
<Tag label="Complet" variant="error" />

When to use

  • Static taxonomy labels next to event titles.
  • Result list meta (genre, salle, langue).
  • Read-only state markers in admin tables.

Accessibility

Tag is a static <span>. Always include a meaningful label.

Props

Prop
Type
Default
Description
label*
string
—

Visible label text.

variant
'neutral' | 'brand' | 'success' | 'warning' | 'error'
neutral

Semantic tone.

size
'sm' | 'md'
md

Height/padding scale.

disabled
boolean
false

Reduces opacity.

Props

Preview

Tag

Prop
Type
Required
Default
Description
label
string
Required
—
No description.
onRemove
() => void
Optional
—
No description.
variant
'neutral' | 'brand' | 'success' | 'warning' | 'error'
Optional
'neutral'

Visual variant.

size
'sm' | 'md' | 'pill'
Optional
'md'

Visual size preset. sm/md are the chip presets (role=group, --ep-tap-min hit area for the optional remove button). `pill` is the NON-INTERACTIVE label preset: solid rounded label, centred, whitespace-nowrap, no tap-target expansion (WCAG 2.5.5 does not apply to a non-control) and no role — a label that groups nothing must not claim to. Ignored when onRemove is supplied.

disabled
boolean
Optional
false

Disables the control.

Quick use:<Tag />

Accessibility

ARIA rolegroup

Type

1 rule

NASA Rule 5

label required; onRemove required if removable

ARIA

1 rule

WCAG 4.1.2

Remove button must have aria-label='Remove {label}'

a11y

1 rule

WCAG 2.5.5 / 4.1.2

size='pill' without onRemove emits no role=group and no --ep-tap-min min-w/min-h (nor the inline-style fallback) — it is a label, not a control

visual

1 rule

Tag.test.tsx / Chip 77fa4870

The brand variant uses the solid theme-stable pair bg-ep-btn-primary + text-ep-text-inverse (5.70:1); the translucent bg-ep-teal/10 + text-ep-text-teal pairing must not return

layout

1 rule

R9 fixed-offset rule

size='pill' is whitespace-nowrap + shrink-0 so the pill never wraps or shrinks in a flex parent

Usage

Import

tsxSnippet
import { Tag } from "@epasslive/design-system"

Example 1

tsxSnippet
<Tag />

Example 2

tsxSnippet
<Tag variant="default" />

Example 3

tsxSnippet
<Tag label="Package" variant="brand" size="pill" />

Anti-patterns

— Do not compose atoms directly — use molecules instead

— Avoid inline styles on atoms

Design System v4.1.0 | ePassLive