1.0.8 • Published 6 years ago

@mandala-ui/list v1.0.8

Weekly downloads
-
License
MIT
Repository
-
Last release
6 years ago

Mandala UI List Component

Mandala is a React component library that utilizes a declarative CSS library for styling.

Installation

Check the MonoRepo README for installation.

Description

A List is used for content in order or in sequence. The props on this list allow you to create robust compound components. It renders all the children inside a <ListItem /> component.

Usage

if using the whole library:

import { List } from 'mandala';

if only using this component:

import List from '@mandala-ui/list';

Props

  • children - items that will be in the list, they must be elements
  • contained - will remove the last bottom border if the list is contained inside another element
  • indented - adds padding for a contained list
  • lineColor - the color of the bottom border of each ListItem
  • lined - set this prop to add lines
  • lineWidth - width of lines, clamped 1-5.
  • narrow - little padding between ListItems.
  • ordered - add a number to the front of each ListItem
  • wide - lots of padding between ListItems
propNamepropTypedefaultValueisRequired
childrennodenull-
containedbooleanfalse-
indentedbooleanfalse-
lineColorstring'white'-
linedbooleanfalse-
lineWidthnumber0-
narrowbooleanfalse-
orderedbooleanfalse-
widebooleanfalse-

TODO:

  • background colors
  • striped
  • infer lined from lineColor prop existence

mandala-bottom