List is component that helps with vertical indexing of content. Every list item begins with a bullet or a number.
How to use List
- when displaying vertical data (text and images)
- when displaying hierarchically indexed content
Component variations
The List component can be configured in two different ways: to display bulleted (unordered) list or numbered (ordered) list.
Code example
Props
List
- NameasHTML Tag or React Component (e.g. div, span, etc)
- NamechildrenReactNode
- NameclassNameDescriptionCSS class to be appended to the root element string
- NametestIdDescriptionA [data-test-id] attribute used for testing purposes string
List.Item
- NamechildrenReactNode
- NameclassNameDescriptionCSS class to be appended to the root element string
- NametestIdDescriptionA [data-test-id] attribute used for testing purposes Defaultstringcf-ui-list-item