# @govuk-react/top-nav

> Styled top navigation header with numerous constituent parts input as props.

Latest version **0.10.7** (published 2024-05-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install @govuk-react/top-nav
pnpm add @govuk-react/top-nav
yarn add @govuk-react/top-nav
bun add @govuk-react/top-nav
```

## Health

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

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.10.7 |
| Published | 2024-05-13 |
| First published | 2018-05-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 7 |
| Unpacked size | 57.3 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/top-nav
- Homepage: https://github.com/govuk-react/govuk-react/tree/main/components/top-nav
- npm.io page: https://npm.io/package/@govuk-react/top-nav

## Dependencies (7)

- [govuk-colours](https://npm.io/package/govuk-colours.md) ^1.1.0
- [@govuk-react/lib](https://npm.io/package/@govuk-react/lib.md) ^0.10.7
- [@govuk-react/icons](https://npm.io/package/@govuk-react/icons.md) ^0.10.7
- [@govuk-react/button](https://npm.io/package/@govuk-react/button.md) ^0.10.7
- [@govuk-react/constants](https://npm.io/package/@govuk-react/constants.md) ^0.10.7
- [@govuk-react/icon-crown](https://npm.io/package/@govuk-react/icon-crown.md) 0.1.0
- [@govuk-react/search-box](https://npm.io/package/@govuk-react/search-box.md) ^0.10.7

## Recent versions

- 0.10.7 (latest) — 2024-05-13
- 0.6.0-rc.1 (next) — 2019-02-28
- 0.10.6 — 2023-10-01
- 0.10.5 — 2022-11-22
- 0.10.4 — 2022-10-08
- 0.10.3 — 2022-08-20
- 0.10.2 — 2022-08-19
- 0.10.1 — 2022-04-08
- 0.10.0 — 2021-10-07
- 0.9.1 — 2021-09-06
- 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
- … 15 more at https://npm.io/package/@govuk-react/top-nav/versions

## README

TopNav
======

### Import
```js
  import TopNav from '@govuk-react/top-nav';
```
<!-- STORY -->

The GOV.UK header shows users that they are on GOV.UK and which service they are using.

- https://govuk-react.github.io/govuk-react/?path=/docs/top-nav
- https://design-system.service.gov.uk/components/header/

### Properties
Prop | Required | Default | Type | Description
:--- | :------- | :------ | :--- | :----------
 `bgColor` |  | ```undefined``` | string | Top nav background color
 `children` |  | ```undefined``` | any | List Navigation items with anchor tags e.g. NavAnchor components
 `color` |  | ```undefined``` | string | Top nav text color
 `company` |  | ```<IconTitle icon={<CrownIcon width="36" height="32" />}>GOV.UK</IconTitle>``` | React.ReactNode | Company component e.g. GOV UK
 `defaultOpen` |  | ```undefined``` | boolean | Is the mobile navigation open by default?
 `search` |  | ```undefined``` | React.ReactNode | Search component
 `serviceTitle` |  | ```undefined``` | React.ReactNode | Service title component e.g. Food Standards Authority

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