Label
A Label is a small, non-interactive visual element used to categorise content or provide quick technical information, such as a vehicle’s powertrain (“Hybrid”, “Plug-in”, “Electric”). It can be configured with or without an icon depending on the context and the space available.
Quarantine
A Label is a small, non-interactive visual element used to categorise content or surface quick technical information. It reads at a glance, helping people scan a list and tell product types or states apart. Use it with or without an icon depending on the context and the space available.
Anatomy
Section titled “Anatomy”- Label
- Icon
- Text
When to use it
Section titled “When to use it”Use a Label when:
- You need to display a technical spec, such as a vehicle feature (“Hybrid”, “Plug-in”, “Electric”).
- You want to show the current state of a system or service.
- You want to help people scan a list and tell product types apart quickly.
Avoid a Label when:
- You want the user to click it — use a Button or a Chip instead.
- You need to show sentences or long descriptions — use standard body text.
- You need a high-priority warning — use an Alert or notification that demands more visual attention.
Pair two Labels — a double label — when:
- The two values belong together and read as one, such as dual specifications (“Hybrid | Plug-in Hybrid”).
- You’re showing comparative data — a before/after or two complementary states.
- A single Label can’t capture the technical detail on its own.
Split the pair with a vertical divider. When the two pieces of information aren’t directly related, keep them as two separate Labels instead — grouping unrelated values behind one divider implies a relationship that isn’t there.
Properties
Section titled “Properties”Colour
Neutral (black) by default. The green, blue, and red variants map to the success, info, and error foreground tokens and signal a category or state. Always pair colour with text and, where helpful, an icon — never rely on colour alone.
Icon
Optional. A decorative icon placed before the text reinforces the meaning (for example a powertrain glyph). When space is tight, drop the icon and keep the text.
Size
Two sizes — small (default) for dense layouts and lists, and large for more prominent placements. Both share the same colours and behaviour.
Style
Sentence case by default; an uppercase style is available for emphatic, tag-like treatments.
Best practices
Section titled “Best practices”Do
Keep copy to 1–3 words, pair colour with text (and an icon when it adds meaning), and use a consistent colour for the same category across a view.
Don't
Don’t make labels clickable, don’t use them for long text or critical alerts, and don’t rely on colour alone to carry the meaning.
Content guidelines
Section titled “Content guidelines”- Be concise. Use 1–3 words. Labels are made for quick scanning, not for reading sentences.
- Keep a parallel form. Use the same grammatical form across a set — all nouns or all verbs.
- No punctuation. Never end a label with a period or use commas within it.
A Label is a non-interactive element, so use a non-interactive tag such as <span>. The icon is optional and decorative — mark it aria-hidden="true".
<span class="tng-label"> <i class="tng-icon icon-hybrid-electric-car-hev" aria-hidden="true" ></i> <span>Hybrid</span></span>Variants
Section titled “Variants”Colours
Section titled “Colours”The default colour is neutral. Use is-green, is-blue, or is-red to signal a category or state. Always keep the text — never rely on colour alone.
<span class="tng-label"> <i class="tng-icon icon-hybrid-electric-car-hev" aria-hidden="true" ></i> <span>Neutral</span></span><span class="tng-label is-green"> <i class="tng-icon icon-self-charging" aria-hidden="true"></i> <span>Green</span></span><span class="tng-label is-blue"> <i class="tng-icon icon-plug-in-hybrid-car-phev" aria-hidden="true" ></i> <span>Blue</span></span><span class="tng-label is-red"> <i class="tng-icon icon-battery-electric-car-bev" aria-hidden="true" ></i> <span>Red</span></span>Uppercase
Section titled “Uppercase”Add is-uppercase to render the copy in uppercase.
<span class="tng-label is-uppercase"> <i class="tng-icon icon-plug-droplet" aria-hidden="true"></i> <span>Plug-in</span></span>Without icon
Section titled “Without icon”Drop the icon when space is tight or the text alone is clear.
The default size is sm. Add is-lg for the larger size.
<span class="tng-label is-sm"> <i class="tng-icon icon-plug-droplet" aria-hidden="true"></i> <span>Small</span></span><span class="tng-label is-lg"> <i class="tng-icon icon-plug-droplet" aria-hidden="true"></i> <span>Large</span></span>Modules
Section titled “Modules”Double label
Section titled “Double label”Read two Labels together as a pair, split by a vertical Divider. Compose the existing tng-label and tng-divider is-inline — no new styles are needed.
Wrap the pair in a container with role="group" and an aria-label that describes the relationship, so a screen reader announces the two labels as one grouped value. The divider is decorative — mark it aria-hidden="true" so it isn’t read out as “vertical bar”.
<div class="tng-group" role="group" aria-label="Powertrain"> <span class="tng-label"> <i class="tng-icon icon-hybrid-electric-car-hev" aria-hidden="true" ></i> <span>Hybrid</span> </span> <div class="tng-divider is-inline" aria-hidden="true"></div> <span class="tng-label"> <i class="tng-icon icon-plug-in-hybrid-car-phev" aria-hidden="true" ></i> <span>Plug-in Hybrid</span> </span></div>A Label is a small, non-interactive visual element that categorises content or carries a quick piece of technical information, with or without a leading icon. It follows no single WAI-ARIA pattern — it isn’t interactive — and meets WCAG 2.1 AA by leaning on plain text semantics: its label is real text, any decorative icon stays out of the assistive-technology tree, its meaning is never carried by colour alone, and it stays out of the tab order so it is never mistaken for a control.
For designers
Section titled “For designers”- The label text and icon must maintain accessible contrast (at least 4.5:1) against every supported surface. On a contrast surface the scheme adds a background plate that preserves it. Source: WCAG 1.4.3 Contrast (Minimum).
- Meaning must never be conveyed by colour alone — pair each colour with text, and add an icon where it reinforces the category, so users who can’t distinguish (for example) the green and red variants still understand it from the text and icon. Source: WCAG 1.4.1 Use of Color.
- Labels are informative, not interactive. Don’t style them to look like buttons or chips — that would mislead people into thinking they can be clicked.
- When two Labels are read together as a pair (a double label, split by a vertical divider), name what the two share so the relationship is explicit — the divider itself is decorative and carries no meaning. Each Label must still meet the 4.5:1 contrast ratio on its own; pairing them adds no new contrast requirement.
For developers
Section titled “For developers”A Label is just text inside a .tng-label container — it takes no role and no interactive semantics, and a screen reader announces its text like any other content. Two things keep it accessible, both wired per element in the Labelling elements section below: keep any leading icon decorative so it doesn’t double-announce the label, and never give the Label interactive semantics or a tab stop, so it isn’t mistaken for a control. When a Label stands in as the value of a labelled field (for example “Fuel type: Hybrid”), make sure the surrounding structure makes that pairing clear so a screen reader announces the term and value together.
Two Labels can also form a double label — read together as a pair, split by a vertical divider (its markup is on the Develop tab). Wrap the pair in a container with role="group" and an aria-label that names the relationship, so a screen reader announces them as one named group rather than two loose values, and keep the divider decorative with aria-hidden="true" so it isn’t announced as “vertical bar”.
Labelling elements
Section titled “Labelling elements”Give every element the role, name, and state assistive technology needs.
Label
The .tng-label container carries no role — it is presentational. Its accessible name is its own text content, so keep that text short and self-describing; it announces as plain text with no added ARIA.
Decorative icon
The leading <i class="tng-icon"> is decorative: mark it aria-hidden="true" so it is removed from the accessibility tree and never doubles the label. If an icon genuinely adds meaning the label’s text doesn’t, surface that meaning in text rather than leaving it on a hidden icon.
Source: WCAG 4.1.2 Name, Role, Value.