furl
Getting startedDesignComponents
Design
Design GuidelinesTypography SystemLayout SystemColor palettesCustomization
Components
ComponentsAccordionAlertAnchorAudioAvatarBadgeBreadcrumbsButtonButtonGroupCalendarCardCollapseContextButtonDividerDropdownFooterFormGraphGridHyperlinkIconIframeImageInputItemLayoutListLoaderMediaObjectMenuModalNotificationPaginationPopoverProgressSearchStepsSwitchTableTabsTooltipTypographyVideo

List

Lists allow you to display short content in a bullet-point or numbered format.

Examples

  • Apples
  • Oranges
  • Eggs
  • Milk
  • Nuts
  • Bolts
  • Cats
  • Dogs
  • Black
  • White
  • Work
  • Fun
  • Oil
  • Water
  1. First
  2. Last
  1. Wake up
  2. Eat breakfast
  1. Brush teeth
  2. Go to sleep
  1. Code
  2. Debug
  1. Cook
  2. Eat
  1. Exercise
  2. Shower
  1. Work
  2. Play
import React from 'react';
import ReactDOM from 'react-dom';
import { List, ListItem } from 'furl-components';

ReactDOM.render(
  <div>
    <List listStyle='disc'>
      <ListItem>Apples</ListItem>
      <ListItem>Oranges</ListItem>
      <ListItem>Strawberries</ListItem>
    </List>
    <List 
      ordered 
      listStyle='decimal'
      data={[ 'Wake up', 'Eat breakfast', 'Go to work' ]}
    />
  </div>, 
  document.getElementById('root')
);

API

List props
Property Description Type Default
ordered render ordered list boolean false
listStyle list style string
data list data source array(string)

Notes

  • You can populate a list either via passing children to it or via the use of the data prop. If data is provided, it will take precedence over passed children, therefore rendering only the content provided in data.
  • A List only accepts children of the ListItem component type.
  • data only accepts an array of string values.
  • ordered determines if the rendered list is an unordered list (<ul>) or an ordered list (<ol>).
  • listStyle’s allowed values depend on the value of ordered.
  • listStyle can be one of the following, when ordered is false: 'circle', 'disc', 'square', 'triangle', 'checkmark', 'xmark' or emtpy/undefined.
  • listStyle can be one of the following, when ordered is true: 'decimal', 'decimal-leading-zero', 'lower-latin', 'lower-roman', 'upper-latin', 'upper-roman' or emtpy/undefined.

furl was designed and developed by Angelos Chalaris © 2019
Documentation generated using Gatsby, hosting by Netlify