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”-
Icon (optional) — a decorative glyph that reinforces the meaning
-
Label text — the copy (1–3 words)
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.
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.
For designers
Section titled “For designers”Colour is not enough
Section titled “Colour is not enough”Never rely on colour alone to convey meaning. Pair each colour with text, and add an icon where it reinforces the category, so people who can’t distinguish the colours still understand it.
Make sure the text and icon colour meet WCAG AA contrast (at least 4.5:1) against the surface behind them. On a contrast surface the label gains a background plate from the scheme, which keeps that contrast.
Non-interactive by nature
Section titled “Non-interactive by nature”Labels are informative, not interactive. Don’t style them to look like buttons or chips, and don’t place them in the tab order — that would mislead people into thinking they can be clicked.
Semantic context
Section titled “Semantic context”When a label is the value of a field — for example in a spec list — keep the relationship clear so it reads as a pair, such as “Fuel type: Hybrid”, rather than the value alone.
For developers
Section titled “For developers”Non-interactive markup
Section titled “Non-interactive markup”Render labels with a non-interactive element such as <span>. Don’t add role="button" and don’t make them keyboard-focusable.
Decorative icons
Section titled “Decorative icons”The icon is decorative — hide it from assistive technology with aria-hidden="true" so the label isn’t announced twice.
<span class="tng-label is-green"> <i class="tng-icon icon-self-charging" aria-hidden="true"></i> <span>Hybrid</span></span>Expose the relationship
Section titled “Expose the relationship”When the label is a field value, mark up the pairing so a screen reader announces “Fuel type: Hybrid” rather than “Hybrid” on its own.
<dl> <dt>Fuel type</dt> <dd> <span class="tng-label is-green"> <i class="tng-icon icon-self-charging" aria-hidden="true"></i> <span>Hybrid</span> </span> </dd></dl>