import { List, ListItem } from "@wfp/react"
Common ListBaseProps
for all kinds of lists:
Property | Type | Default | Description |
---|---|---|---|
colon | boolean | false | If true , colons will be displayed in the List items. |
kind | string (see kinds below) | null | Specifies the visual presentation style of the List. |
small | boolean | false | If true , renders the List with a smaller font size and padding. |
unstyled
simple-inline
simple
details
unordered
ordered
tooltip
bullets
Depending on the kind
of list chosen, the component may also accept all standard attributes for either an <ul>
or a <ol>
tag.
Simple vertical list.
<List kind="simple"> <ListItem>First Item</ListItem> <ListItem>Second Item</ListItem> {/* More ListItems ... */} </List>;
Simple horizontal list.
<List kind="simple-inline"> <ListItem>First Item</ListItem> <ListItem>Second Item</ListItem> </List>;
Adds bullets in front of each list entry.
<List kind="bullets"> <ListItem>First Item</ListItem> <ListItem>Second Item</ListItem> </List>;
Creates an ordered list
<List kind="ordered"> <li>First Item</li> <li>Second Item</li> </List>;
Detail view here the content is on a new line and the title
is bold.
<List kind="details"> <ListItem>First Item</ListItem> <ListItem>Second Item</ListItem> </List>;
Adding colons after each title
<List colon={true} kind="details"> <ListItem title="First">Item with colon</ListItem> <ListItem title="Second"> Another item with colon </ListItem> </List>;
Uses a smaller font-size for the list.
<List small={true}> <ListItem>Small styled item</ListItem> <ListItem>Another small styled item</ListItem> </List>;