Tag
Compact labels for filters and metadata. Add data-re-dismissible with a data-re-dismiss button to make a tag removable.
Variants
Section titled “Variants”
Neutral
Info
Success
Warning
Danger
<div class="row">
<span class="re-tag">Neutral</span>
<span class="re-tag" data-tone="info">Info</span>
<span class="re-tag" data-tone="success">Success</span>
<span class="re-tag" data-tone="warning">Warning</span>
<span class="re-tag" data-tone="danger">Danger</span>
</div> Removable
Section titled “Removable”
Design
Engineering
<div class="row" id="filters">
<span class="re-tag" data-re-dismissible>
Design
<button class="re-tag__remove" type="button" data-re-dismiss aria-label="Remove Design">
×
</button>
</span>
<span class="re-tag" data-re-dismissible>
Engineering
<button
class="re-tag__remove"
type="button"
data-re-dismiss
aria-label="Remove Engineering"
>
×
</button>
</span>
</div> Accessibility
Section titled “Accessibility”- Semantics — the tag is a plain
<span class="re-tag">; tones (data-tone) are decorative styling only, so any meaning they carry must also be in the text. A removable tag adds a native<button data-re-dismiss>with anaria-label(e.g.Remove Design) so the action is announced even though the×glyph isn’t descriptive. - Keyboard — a plain tag is not focusable. The remove button is a native button: Tab to focus, Enter or Space to activate. Activating it hides the tag and dispatches a cancelable
re-dismissevent (see Removable). - Focus — the remove button shows a visible
:focus-visiblering.
See the accessibility guide for project-wide conventions.