Code

List component usage and API reference.

This component require devs to use one variant or another from the very first moment based on the kind of list developers want to insert. <List.Order> or <List.Unorder>.

API

This component extends the native anchor tag props. This means this component can receive the native html div tag attributes.

Props
Data Type
Required

children

List.Item

className

string

type

'1' | 'A' | 'a' | 'I' | 'i'

The type prop will only work for ordered lists.

List.Item

This subcomponent basically works as the <li> tag on normal lists, with the main different it will only accept text as children element. Besides that, if the developer is working with an un-order list, they can add the prop symbol and customize the bullet that's shown next to the text content.

Props
Data Type
Required

children

string

className

string

symbol

'disc' | 'circle | 'square' | 'string'

The symbol customization will only work on unordered lists.

Example

Last updated