@govuk-react/list-navigation

Renders ListItems in an UnorderedList from children sent, with optional list style type.

Stats

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

Readme

ListNavigation

Import

  import ListNavigation from '@govuk-react/list-navigation';

Usage

Simple

import { ListNavigation, Link } from 'govuk-react';

<ListNavigation>
  <Link href="/section-a">Section A</Link>
  <Link href="/section-b">Section B</Link>
</ListNavigation>

Using React Router with Link component for GDS styled links

import { Link as RouterLink } from 'react-router-dom';
import { ListNavigation, Link } from 'govuk-react';

<ListNavigation listStyleType="circle">
  <Link as={RouterLink} to="/link-a">Link A</Link>
  <Link as={RouterLink} to="/link-b">Link B</Link>
</ListNavigation>

References:

TODO:

Properties

Prop Required Default Type Description
children true `````` node List navigation content
listStyleType undefined string CSS value for list-style-type

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.