# @govuk-react/layout

> Component intended to surround grid layouts but now no longer used/required.

Latest version **0.8.0** (published 2021-05-16) · MIT license · 0 weekly downloads

## Install

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

## 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.8.0 |
| Published | 2021-05-16 |
| First published | 2018-03-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 18.5 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/layout
- Homepage: https://github.com/govuk-react/govuk-react/tree/master/components/layout
- npm.io page: https://npm.io/package/@govuk-react/layout

## Dependencies (1)

- [@govuk-react/constants](https://npm.io/package/@govuk-react/constants.md) ^0.8.0

## Recent versions

- 0.8.0 (latest) — 2021-05-16
- 0.6.0-rc.1 (next) — 2019-02-28
- 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
- 0.2.12 — 2018-09-26
- 0.2.7 — 2018-06-29
- … 14 more at https://npm.io/package/@govuk-react/layout/versions

## README

Layout
======

### Import
```js
  import Layout from '@govuk-react/layout';
```
<!-- STORY -->

THIS COMPONENT IS NO LONGER REQUIRED TO ACHIEVE LAYOUT;
1. `GridCol` contains the required gutters, we do not need to provide additional gutter
to build an accurate grid layout.

2. `GridRow` contains the required `display: flex;` and associated properties for `GridCol`.

3. `Main` contains the required properties to center a container that matches up with `TopNav`
and house the remaining body of content for the page.

If you feel you may still need a `Layout` component, please do raise a ticket on [Github](https://github.com/govuk-react/govuk-react/issues/177)

### Usage

This component provides default padding.
You can use this component to wrap Grid components however it is not required.

Simple usage
```jsx
import GridRow from '@govuk-react/grid-row';
import GridCol from '@govuk-react/grid-col';

<Layout>
  <GridRow>
    <GridCol>
      ...
    </GridCol>
  </GridRow>
</Layout>
```

### References:
- https://github.com/alphagov/govuk_frontend_toolkit/blob/master/stylesheets/_grid_layout.scss
- https://github.com/alphagov/govuk_elements/blob/master/assets/sass/elements/_layout.scss

### Properties
Prop | Required | Default | Type | Description
:--- | :------- | :------ | :--- | :----------
 `children` | true | `````` | node | GridRow and GridCol children nodes

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