Skip to main content

List

This component is used to render ordered and unordered lists.

Example

Live Editor
Result
Loading...

Usage Rules

Do

  • Use List as the parent wrapper
  • Wrap all direct children on <li> tags
  • Add any necessary markup inside the <li> tags

Don't

  • Nest any other html tag as direct child of List

Variants

Extended

The list can also have the extended prop. In this case the space between items increases.

Live Editor
Result
Loading...
Live Editor
Result
Loading...

Kind

We have two kinds of lists, ordered and unordered. If the prop ordered is not set, it defaults to unordered.

Live Editor
Result
Loading...
Live Editor
Result
Loading...

Nested

List component supports nesting. You can mix ordered and unordered lists if neccesary.

Live Editor
Result
Loading...

Different levels will have different bullets in the case of unordered.

Live Editor
Result
Loading...

Props

NameTypeDefault
ordered
Changes to the ordered type of list using an <ol>
boolean
false
extended
Adds a wider space between <li> elements
boolean
false
children
The content of the List
ReactNode
css
Add custom styles to this component. Use with caution. Learn more here: Link
SupportedStyleAttributes
inputFieldCss
SupportedStyleAttributes
data-{foo}
Data attributes can be used by testing libraries to retrieve components or assert their existence
string
* - the prop is required.