List
A List component renders a collection of items as anchor links. Each item can display an icon and a label, making it useful for navigation menus or compact link groups.
Ready to use
The List displays groups of related items in a compact, vertically stacked layout. It works as a building block inside other containers — dropdowns, modals, side panels — wherever a set of straightforward choices needs to read as one group.
Anatomy
Section titled “Anatomy”- Prius
- Corolla
- List
- Leading icon
- Label
- Trailing icon
- List Option
When to use it
Section titled “When to use it”Use the List when:
- You need to display groups of related items such as options or categories.
- The content doesn’t need complex interaction beyond item selection or viewing.
- A list will be embedded inside another container (dropdown menu, modal action set, side-panel selection).
Avoid the List when:
- The content is tabular or multi-column — use a Data Table instead.
Properties
Section titled “Properties”Type
Two types: Simple List for single-select or read-only browsing, and Multiselect which pairs each row with a checkbox and an item count. Both share the same row layout; only the leading control changes.
Leading and trailing icons
Optional icons before and after the label. The leading slot typically holds a category glyph or status indicator; the trailing slot carries chevrons, external-link hints, or an indicator for the current selection.
Scroll bar
A boolean that surfaces a visible scrollbar inside long lists. Default true for embedded contexts (dropdown menus, modals) so users know there’s more content beneath the fold.
Bottom CTA
Optional action area pinned beneath the list — used for “Apply” or “Clear” actions on multiselect filters. Default true on multiselect, off on simple lists.
Platform considerations
Section titled “Platform considerations”Desktop
Lists typically sit inside other containers and hug the width of their parent. Keep row height consistent across rows so the scan reads as one column.
Tablet
Same behaviour as desktop. Touch targets are governed by the row height — make sure each option clears the recommended 44 px tap area.
Mobile
Lists often promote to a sheet at this size. Keep the bottom CTA reachable inside the thumb zone when the list lives in a multiselect filter.
Best practices
Section titled “Best practices”Lists work best when presenting straightforward choices without additional metadata or complexity.
Do
Keep list item labels concise, fit each row on a single line, use clear and meaningful wording for each label, review long labels individually before truncating, and use the List only for simple, straightforward options without descriptions or metadata.
Don't
Don’t include two lines of text per item (multi-line labels break the layout), don’t truncate by default, don’t overload items with extra information like sublabels or tags unless they add meaning, don’t lean on the List for complex messages, and don’t mix very long items with very short ones — keep content harmonised.
Content guidelines
Section titled “Content guidelines”Each label should communicate its purpose without extra detail or filler. Aim for short, scannable text that fits naturally on one line, and use parallel wording across items so the comparison reads cleanly. If an item needs more characters, evaluate it on its own merits before reaching for truncation — sometimes a rephrase or a different component is the better answer. Avoid leading articles (“The new Yaris”) so the comparison stays aligned by the meaningful keyword.
Styles
Section titled “Styles”<ul class="tng-list"> <li class="tng-list-option">Option 1</li> <li class="tng-list-option">Option 2</li></ul>- Option 1
- Option 2
Elements
Section titled “Elements”<div class="tng-list-option"> <i aria-hidden="true" class="tng-icon icon-car is-md"></i> Option 1 <i aria-hidden="true" class="tng-icon icon-chevron-right tng-rtl-flip-x" ></i></div><ul class="tng-list"> <li class="tng-list-option"> <img src="/_astro/prius.B6m1c0f0.png" role="presentation" /> <span>Toyota Prius</span> </li></ul>-
Toyota Prius
Content
Section titled “Content”Checkbox Control
Section titled “Checkbox Control”<div class="tng-list-option"> <label class="tng-checkbox-control"> <input type="checkbox" /> <span>Option 1</span> </label></div>Interactive Content
Section titled “Interactive Content”You can wrap the content of a list option in an interactive element, such as a link or button, to make the entire option clickable.
<div class="tng-list-option"> <button> <i aria-hidden="true" class="tng-icon icon-car is-md"></i> <span>Option 1</span> <i aria-hidden="true" class="tng-icon icon-chevron-right tng-rtl-flip-x" ></i> </button></div>Powertrain Option
Section titled “Powertrain Option”There’s a special layout for powertrain options that includes an icon, subtitle, and additional info.
<li class="tng-list-option"> <img role="presentation" src="/_astro/prius.B6m1c0f0.png" /> <div class="tng-list-powertrain"> <div class="tng-list-powertrain-subtitle"> <span class="tng-label is-blue"> <i class="tng-icon icon-plug-droplet" aria-hidden="true"></i> <span>Powertrain</span> </span> <div>333 mi</div> </div> <div>Toyota Prius</div> </div></li>
Modules
Section titled “Modules”Login Menu
Section titled “Login Menu”<ul class="tng-list | tng-has-dividers"> <li class="tng-list-option"> <a class="pb-lg" href="#"> <span>My Vehicles</span> <i aria-hidden="true" class="tng-icon icon-chevron-right tng-rtl-flip-x" ></i> </a> </li> <li class="tng-list-option"> <a class="pb-lg" href="#"> <span>My finance</span> <i aria-hidden="true" class="tng-icon icon-chevron-right tng-rtl-flip-x" ></i> </a> </li> <li class="tng-list-option"> <a class="pb-lg" href="#"> <span>My Toyota App</span> <i aria-hidden="true" class="tng-icon icon-chevron-right tng-rtl-flip-x" ></i> </a> </li> <li class="tng-list-option"> <a class="pb-lg" href="#"> <span>My Rewards</span> <i aria-hidden="true" class="tng-icon icon-chevron-right tng-rtl-flip-x" ></i> </a> </li></ul>Plain List
Section titled “Plain List”<ol class="tng-plain-list"> <li>List item 1</li> <li>List item 2</li> <li> Nested ordered list <ol> <li>Nested list item 1</li> <li>Nested list item 2</li> </ol> </li> <li> Nested unordered list <ul> <li>Nested list item 1</li> <li>Nested list item 2</li> </ul> </li></ol>- List item 1
- List item 2
-
Nested ordered list
- Nested list item 1
- Nested list item 2
-
Nested unordered list
- Nested list item 1
- Nested list item 2
<ul class="tng-plain-list"> <li>List item 1</li> <li>List item 2</li> <li> Nested ordered list <ol> <li>Nested list item 1</li> <li>Nested list item 2</li> </ol> </li> <li> Nested unordered list <ul> <li>Nested list item 1</li> <li>Nested list item 2</li> </ul> </li></ul>- List item 1
- List item 2
-
Nested ordered list
- Nested list item 1
- Nested list item 2
-
Nested unordered list
- Nested list item 1
- Nested list item 2
Import the List and ListItem components from @tmedxp/react-components.
Properties
Section titled “Properties”ListProperties extends PropsWithChildren<...>.
| Prop | Type | Description | Optional |
|---|---|---|---|
hasDivider |
boolean |
Whether to display a divider. | ✅ |
type |
'simple' | 'multiselect' |
Defines the component behavior. | ✅ |
className |
string |
Additional CSS class names for styling. | ✅ |
ListItemProperties extends AnchorHTMLAttributes<HTMLAnchorElement>.
| Prop | Type | Description | Optional |
|---|---|---|---|
iconName |
IconProperties['name'] |
Icon name to display from the library. | ✅ |
isSelected |
boolean |
Whether the list item is currently selected. | ✅ |
label |
string |
The text label displayed in the anchor. | ✅ |
showTrailingIcon |
boolean |
Icon displayed after the anchor label. | ✅ |
Example
Section titled “Example”import { List, ListItem } from '@tmedxp/react-components';
const SimpleList = () => { return ( <List> <ListItem key={1} label="FR" iconName="settings" showTrailingIcon={true} href="https://www.toyota.fr" /> <ListItem key={2} label="BE" iconName="profile" showTrailingIcon={true} href="https://www.toyota.be" /> </List> );};
export { SimpleList };The List presents a set of related items as one group. Built on native list markup, it carries list semantics for free, so assistive technology can announce the item count and each item’s position (“list, 3 items, item 1 of 3”) without any extra wiring. It is a static, non-interactive container — it takes no focus and has no keyboard model of its own — and meets WCAG 2.1 AA.
For designers
Section titled “For designers”- Item labels must keep accessible contrast against every supported surface (lists sit inside dropdowns, modals, and side panels). Source: WCAG 1.4.3 Contrast (Minimum).
- Dividers, and any non-text indicator that carries meaning, must have sufficient contrast against the surface behind them. Source: WCAG 1.4.11 Non-text Contrast.
- If an item’s status is shown with colour, never let colour be the only cue — pair it with text, an icon, or a shape. Source: WCAG 1.4.1 Use of Color.
- Keep row height and spacing consistent and comfortable so the list stays scannable; where a consumer makes a row interactive, that target should clear the 44 px minimum.
- Use semantic colour tokens (e.g.
foreground/neutral/default) rather than fixed values, so the list adapts correctly across themes and surfaces.
For developers
Section titled “For developers”Build the list from native <ul> or <ol> with <li> children so the list role, item count, and each item’s position are exposed to assistive technology automatically — no ARIA needed. Source: WCAG 1.3.1 Info and Relationships.
Watch the Safari quirk: setting list-style: none (as the styled tng-list does to drop the native markers) makes Safari and VoiceOver strip the list role, so the count and position are lost. Restore it with role="list" on the container when your styling removes the markers. The tng-plain-list variant keeps its markers and needs no such fix.
Name the list when its purpose isn’t clear from surrounding context: associate a visible heading with aria-labelledby, or give the container an aria-label, so it doesn’t announce as an unnamed list. When the list follows a heading that already describes it, no extra name is needed. Source: WCAG 4.1.2 Name, Role, Value.
Where a row wraps a link, button, or checkbox to make it actionable, that control’s role, keyboard behaviour, and accessible name belong to the consumer’s content — the List documents only its own item structure.