# @govuk-react/list-navigation

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

Latest version **0.9.1** (published 2021-09-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install @govuk-react/list-navigation
pnpm add @govuk-react/list-navigation
yarn add @govuk-react/list-navigation
bun add @govuk-react/list-navigation
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.9.1 |
| Published | 2021-09-06 |
| First published | 2018-03-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 3 |
| Unpacked size | 27.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Alasdair McLeay |
| Maintainers | loque-, steve_sims, petelockey, penx, marksy |

## Links

- npm: https://www.npmjs.com/package/@govuk-react/list-navigation
- Homepage: https://github.com/govuk-react/govuk-react/tree/main/components/list-navigation
- npm.io page: https://npm.io/package/@govuk-react/list-navigation

## Dependencies (3)

- [@govuk-react/constants](https://npm.io/package/@govuk-react/constants.md) ^0.9.1
- [@govuk-react/list-item](https://npm.io/package/@govuk-react/list-item.md) ^0.9.1
- [@govuk-react/unordered-list](https://npm.io/package/@govuk-react/unordered-list.md) ^0.9.1

## Recent versions

- 0.9.1 (latest) — 2021-09-06
- 0.6.0-rc.1 (next) — 2019-02-28
- 0.9.0 — 2021-05-30
- 0.8.0 — 2021-05-16
- 0.7.1 — 2019-05-24
- 0.7.0 — 2019-03-15
- 0.6.0 — 2019-03-01
- 0.6.0-alpha.4 — 2019-02-15
- 0.6.0-alpha.1 — 2019-02-07
- 0.6.0-alpha.0 — 2019-02-07
- 0.5.1 — 2019-02-04
- 0.5.0 — 2019-01-21
- 0.4.0 — 2019-01-14
- 0.3.1 — 2018-11-07
- 0.3.0 — 2018-10-29
- … 16 more at https://npm.io/package/@govuk-react/list-navigation/versions

## README

ListNavigation
==============

### Import
```js
  import ListNavigation from '@govuk-react/list-navigation';
```
<!-- STORY -->

### Usage

Simple

```jsx
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

```jsx
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:

- https://govuk-static.herokuapp.com/component-guide/government_navigation

### TODO:
- Consider using the context API https://github.com/reactjs/rfcs/blob/master/text/0002-new-version-of-context.md
- Fix active state overlaping siblings

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

---
_Source: https://npm.io/package/@govuk-react/list-navigation · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
