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 List component uses the cn function from 'components/lib' for class name handling.

  • The className prop allows for custom styling to be applied.

  • The items prop specifies the list of items to be displayed.

  • The ordered prop determines whether the list is ordered (<ol>) or unordered (<ul>).

Last updated