# @cfware/loading

> Display a loading spinner until the `loaded` attribute is set to the document body

Latest version **1.0.0** (published 2023-10-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install @cfware/loading
pnpm add @cfware/loading
yarn add @cfware/loading
bun add @cfware/loading
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2023-10-16 |
| First published | 2020-09-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=18 |
| Dependencies | 0 |
| Unpacked size | 6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Corey Farrell |
| Maintainers | coreyfarrell |

## Links

- npm: https://www.npmjs.com/package/@cfware/loading
- Repository: https://github.com/cfware/loading
- Homepage: https://github.com/cfware/loading#readme
- Issues: https://github.com/cfware/loading/issues
- npm.io page: https://npm.io/package/@cfware/loading

## Recent versions

- 1.0.0 (latest) — 2023-10-16
- 0.1.3 — 2022-08-13
- 0.1.2 — 2020-11-07
- 0.1.1 — 2020-11-06
- 0.1.0 — 2020-09-22

## README

# @cfware/loading [![NPM Version][npm-image]][npm-url]

Display a loading spinner until the `loaded` attribute is set to the document body.

## Usage

Create `loading.js`:
```js
import '@cfware/loading';
```

Create `index.html`:
```html
<!doctype html>
<html lang="en-US">
	<head>
		<meta charset="utf-8">

		<script type="module" src="loading.js"></script>
		<script type="module" defer src="app.js"></script>
	</head>
	<body>
	</body>
</html>
```

Create `app.js`, ensure it runs `document.body.setAttribute('loaded', '')` when the
application is ready to be displayed.

[npm-image]: https://img.shields.io/npm/v/@cfware/loading.svg
[npm-url]: https://npmjs.org/package/@cfware/loading

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