| # | Required | Element | Description |
|---|---|---|---|
| 1 | Container | Renders as an ordered or unordered list and holds the items. | |
| 2 | No | Marker | The bullet or number preceding each item. Can be hidden for an Icon. |
| 3 | Item | Renders as a list item (li) and holds a single entry's content. |
The List component is used to present an ordered (ol) or unordered (ul) group of items within semantic HTML markup. Lists are best used to organize a related group of items by recommendation, requirements, steps, or other.
Both List and DescriptionList are components that organize a group of items. However, it's important to understand the underlying difference as they are not interchangeable:
Hide default markers when using a leading icon to better communicate meaning associated with the item, such as a checkmark to denote a completed step.
Use an ordered list when the items are important to display in sequential order.
Ordered lists are used to communicate a series of steps or ranking, where the item's position carries meaning.
Unordered lists do not have an inherent order and can be used for items like features or requirements.
Items are displayed with the default amount of gap space between them. Consider adding more space when items wrap to multiple lines so each item is clearly distinct from the others.
Additional gap space helps readability for longer list items.
No gap is best suited for shorter list items.
Marker style sets the bullet or number marker preceding each item, regardless of whether the List is ordered or unordered.
Marker style can be set independently of the underlying list element.
List items are compatible with rich text. Icons, Links, any other contextual elements may be added for emphasis.
Icons, Links, and nested inline formatting can appear within a single item alongside plain text.
When writing list items, be consistent on grammatical structure. If one item begins with a verb, others should follow suit. This helps reader easily scan items and lessens cognitive load.