A small rounded element used for categories, search filters, states, and other small multiples. Tags remain the same across public and internal pages.
Size and shape remain the same across all levels, prominence comes from color and text. Reach for the quietest one that still does the job.
Warm grey: the default
Warm grey creates quiet labels that organize without claiming attention: counts, search filters, ancillary labels. Use for labels that are not particularly notable.
<span class="ds-tag">Preprint</span>
<span class="ds-tag">12 requests</span>
<!-- A category. Always --keep-case. -->
<span class="ds-tag ds-tag--keep-case">cs.AI</span>
min-height: 24px for the WCAG 2.2 target
floor. Goes on a <span>, an <a>, or a
<button>.Blue: the arXiv voice
Use these labels when “arXiv is speaking”. For example, arXiv's subject categories are a key part of our taxonomy and make sense in this color.
<span class="ds-tag ds-tag--info">Policy</span>
<!-- A category. Always --keep-case. -->
<span class="ds-tag ds-tag--info ds-tag--keep-case">math.CO</span>
<!-- A topic that links to its listing -->
<a class="ds-tag ds-tag--info" href="/list/policy">Policy</a>
Alert colors: Status and condition
An alert color is used only when it reports a condition, like a status. Neutral conditions use blue because they are informative, just as we do with neutral alert messages.
<span class="ds-tag ds-tag--success">Valid</span>
<span class="ds-tag ds-tag--warning">On hold</span>
<span class="ds-tag ds-tag--error">Removed</span>
<!-- A neutral state is info, not a status -->
<span class="ds-tag ds-tag--info">Under review</span>
.ds-tag--keep-case on any tag that holds a category name or an arXiv ID, so that
physics.optics is never shown as PHYSICS.OPTICS..ds-tag-remove holds a
<span class="is-sr-only"> that says what it removes, such as “Remove
cs.AI”, and the ✕ glyph sits in a span with aria-hidden="true". Do not use
title or aria-label for this, because page translation tools skip
attributes.A tag is a <span> unless it does something. A tag that goes somewhere is an <a> with an href, and a tag that acts on the page, such as a filter that switches on and off, is a <button>. Both take the same classes, both can be reached from the keyboard, and both show the focus ring. A <span> with a click handler does neither.
<!-- Goes to the category listing -->
<a class="ds-tag ds-tag--info ds-tag--keep-case" href="/list/cs.AI">cs.AI</a>
<!-- Acts on this page: a filter that is on -->
<button type="button" class="ds-tag" aria-pressed="true">Open access</button>
href; a button has type="button",
and aria-pressed if it switches something on and off.A tag should not stand in for a link
A tag labels or categorizes the thing it sits on. A label might be a link when it makes sense, but it should never replace a text link as the better way to navigate off the page.
Rectangular instead of pill-shaped, this label variant is useful in very dense interfaces where you need to reclaim the extra left and right margin space.
<span class="ds-tag ds-tag--success ds-tag--rectangle">Approved</span>
<span class="ds-tag ds-tag--warning ds-tag--rectangle">Flagged</span>
<span class="ds-tag ds-tag--error ds-tag--rectangle">Removed</span>
<span class="ds-tag ds-tag--info ds-tag--rectangle">Submitted</span>
Different parts of a tag can be combined, even doubled, for more complex uses. Consult with the design team on your specific use case. Below is one example from the Admin console of tags that carry both a category name and a nested .ds-tag-note that says where it came from.
<!-- With a nested provenance badge -->
<span class="ds-tag ds-tag--info ds-tag--keep-case">physics.bio-ph
<span class="ds-tag-note">bsmith</span>
</span>
<span class="ds-tag ds-tag--info ds-tag--keep-case">cs.CV
<span class="ds-tag-note ds-tag-note--auto">auto</span>
</span>
<!-- Revoked: the error variant carries the whole thing -->
<span class="ds-tag ds-tag--error ds-tag--keep-case">− physics.gen-ph
<span class="ds-tag-note">ginsparg</span>
</span>
<!-- Editable, with a remove control -->
<span class="ds-tag ds-tag--info ds-tag--keep-case">math.AP
<button class="ds-tag-remove" type="button">
<span aria-hidden="true">✕</span>
<span class="is-sr-only">Remove math.AP</span>
</button>
</span>
<button type="button">
that is the last child of the tag. Removing the tag is the host’s job.aria-hidden, so
without this span the button announces as “button” and nothing more. Say what it removes:
“Remove math.AP”.The remove control is the only editing the tag knows about
Anything else a person can do to a tag, such as drag it into a different order or pick it from a search box, belongs to the editor around the tags, not to .ds-tag. That editor is not documented yet.
Read at runtime from design-system.css via
getComputedStyle — swatches, hex codes, and contrast ratios reflect the currently active
mode and cannot drift from the stylesheet. Use the theme control in the header to see the dark
values. Contrast is text-on-background (target 4.5:1 AA).
| Level | Background | Border | Text | Contrast |
|---|