Overview
The List component displays a set of related text-only content in a structured manner. It breaks up chunks of related information, making it easier for users to scan and understand the content.
When to use
- When you need to display a group of related items, such as features, options, or steps.
When not to use:
- When you want to present a single option with an icon, such as “30-day warranty,” use the IconLabel component instead.
Anatomy
- List
- ListItem
- Indicator (ListType)
- Text
Variants & States
Gap
The gap property controls the spacing between ListItems, enhancing readability and visual appeal. We provide four gap settings to cater to various design needs: gap-0, gap-2, gap-3, and gap-4.
DarkMode
To ensure optimal readability on different backgrounds, we offer a darkMode property.
Size
The size of List used depends on its context. In most cases, the List should use the same size as the text surrounding it. In a default paragraph, for standalone Lists md size is usually a safe choice.
Style-type
There are four different indicator options for the List component:
discThe default type is a disc.checkProvides a checkmark.customAllows for any other icon, which should be related to the content.noneRemoves the graphical element in front of the ListItem.
Internationalization
For RTL (right-to-left) languages, no custom adjustments have been made.
Properties
| Name | Type | Values | Description |
|---|---|---|---|
| styleType | String | discchecknumberedcustomnone |
Defines the style of the list indicator |
| customStyleTypeIcon | String | Custom style icon to be used when styleType is set to custom | |
| size | String | smmdlg |
Specifies the size of the List items |
| gap | String | gap-0gap-2gap-3gap-4 |
Determines the spacing between List items |
| darkMode | Boolean | truefalse |
Usage Guidelines
Content Guidelines
We use lists for various purposes, like showing benefits, breaking down the actionable steps or marking app changes.
Voice and tone
Different types of lists can have completely different tones. It all depends on the purpose of the list.
Copy
- For tutorial-type lists, language is short, and numbering is preferable.
- For marketing purposes and other contexts (for example, release notes), the language should be friendly and helpful.
Accessibility
- If the list has bullets or checkmarks, the narrator should omit the signs and read the list as a single item.
- Numbered lists should be narrated with numbers included.