List
The List component renders an ordered or unordered list based with the provided items.
Ordered & Unordered
import { List } from 'components/lib';
function MyComponent({ ...props }){
return (
<div>
<List items={['Item 1', 'Item 2', 'Item 3']} ordered/>
</div>
);
}
Props
Props
Description
Required
Value
className
custom style
optional
SCSS or Tailwind
items
list of items
required
array of strings
ordered
show an ordered list
optional
boolean
Notes
The
Listcomponent uses thecnfunction from'components/lib'for class name handling.The
classNameprop allows for custom styling to be applied.The
itemsprop specifies the list of items to be displayed.The
orderedprop determines whether the list is ordered (<ol>) or unordered (<ul>).
Last updated
Was this helpful?