# @govuk-react/loading-box

> Absolutely positioned loading overlay with spinner and numerous configurable options.

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

## Install

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

## 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-04-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 5 |
| Unpacked size | 27.8 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/loading-box
- Homepage: https://github.com/govuk-react/govuk-react/tree/main/components/loading-box
- npm.io page: https://npm.io/package/@govuk-react/loading-box

## Dependencies (5)

- [hex-rgb](https://npm.io/package/hex-rgb.md) ^4.0.0
- [govuk-colours](https://npm.io/package/govuk-colours.md) ^1.1.0
- [@govuk-react/icons](https://npm.io/package/@govuk-react/icons.md) ^0.10.7
- [@govuk-react/constants](https://npm.io/package/@govuk-react/constants.md) ^0.10.7
- [react-transition-group](https://npm.io/package/react-transition-group.md) ^4.4.5

## 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.2 — 2019-07-04
- 0.7.1 — 2019-05-24
- 0.7.0 — 2019-03-15
- … 21 more at https://npm.io/package/@govuk-react/loading-box/versions

## README

LoadingBox
==========

### Import
```js
  import LoadingBox from '@govuk-react/loading-box';
```
<!-- STORY -->

Use a LoadingBox to wrap components that can asyncronously load content.

When `loading` is set to `true`, a spinner will overlay the contents to give visual feedback to the user.

- https://govuk-react.github.io/govuk-react/?path=/docs/loading-box

### Properties
Prop | Required | Default | Type | Description
:--- | :------- | :------ | :--- | :----------
 `backgroundColor` |  | ```undefined``` | string | Background color (3 or 6 Hex char) of loading spinner overlay when loading is true.
 `backgroundColorOpacity` |  | ```undefined``` | number | Opacity of loading spinner backgroud colour when loading is true
 `children` |  |  | ReactNode | One or more children nodes that loading box will overlay
 `loading` |  | ```undefined``` | boolean | Whether loading is currently set to true or false
 `spinnerColor` |  | ```undefined``` | string | Color (3 or 6 Hex char) of loading spinner
 `timeIn` |  | ```undefined``` | number | Length of fade-in animation in milliseconds
 `timeOut` |  | ```undefined``` | number | Length of fade-out animation in milliseconds
 `title` |  | ```undefined``` | string | Loading spinner title text

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