List
Display ordered or unordered list
Source
LLM docs
Docs
PackageIcon
Usage
- Clone or download repository from GitHub
- Install dependencies with yarn
- To start development server run npm start command
- Run tests to make sure your changes do not break the build
- Submit a pull request once you are done
Type
Size
With icons
You can replace list bullets with an icon. To do so, provide the following props:
iconon the List component will be used as the default icon for all list elementsiconon the List.Item component will override the context icon from Listspacing– spacing between list items from the theme or any valid CSS value to set spacing, defaults to0center– center item content with the iconsize– set font size from the theme
- Clone or download repository from GitHub
- Install dependencies with yarn
- To start development server run npm start command
- Run tests to make sure your changes do not break the build
- Submit a pull request once you are done
Nested lists
Set the withPadding prop to offset nested lists and listStyleType to control the bullet type:
- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation
- First order item
- First order item with list
- Nested item
- Nested item
- Nested item with list
- Even more nested
- Even more nested
- Nested item
- First order item
Ordered list numbering
Start from specific number
Use the start prop to begin numbering from a specific value:
- This is item #5
- This is item #6
- This is item #7
- This is item #8
Reversed numbering
Use the reversed prop to create countdown lists:
- This is item #3
- This is item #2
- This is item #1
Custom item values
Use the value prop on individual List.Item components to set specific numbers:
- First item
- This item is #5
- This item is #6 (continues from previous)
- This item is #10
- This item is #11