@govuk-react/ordered-list

Renders an ordered list containing children passed - also supports listStyleType prop.

Stats

stars 🌟issues ⚠️updated 🛠created 🐣size 🏋️‍♀️
@govuk-react/ordered-list
Minified + gzip package size for @govuk-react/ordered-list in KB

Readme

OrderedList

Import

  import OrderedList from '@govuk-react/ordered-list';

Usage

Simple

import { OrderedList, ListItem } from 'govuk-react'

<OrderedList>
  <ListItem>Lorem ipsum dolor sit.</ListItem>
  <ListItem>Consectetur adipiscing elit.</ListItem>
  <ListItem>Curabitur et libero nec.</ListItem>
</OrderedList>

With Roman

import { OrderedList, ListItem } from 'govuk-react'

<OrderedList listStyleType="lower-roman">
  <ListItem>Lorem ipsum dolor sit.</ListItem>
  <ListItem>Consectetur adipiscing elit.</ListItem>
  <ListItem>Curabitur et libero nec.</ListItem>
</OrderedList>

References

TODO

Properties

Prop Required Default Type Description
children true `````` node One or more ListItem components
listStyleType undefined string CSS value for list-style-type, or bullet or number to match govuk-frontend

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.