# ak-spinner

> A React component that displays a spinning icon to show a loading state

Latest version **1.1.0** (published 2017-01-19) · Apache-2.0 license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install ak-spinner
pnpm add ak-spinner
yarn add ak-spinner
bun add ak-spinner
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2017-01-19 |
| First published | 2016-12-16 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Atlassian Pty Ltd |
| Maintainers | atlassian-aui |
| Keywords | atlaskit, ui |

## Links

- npm: https://www.npmjs.com/package/ak-spinner
- Repository: https://bitbucket.org/atlassian/atlaskit
- Homepage: https://bitbucket.org/atlassian/atlaskit#readme
- npm.io page: https://npm.io/package/ak-spinner

## Dependencies (2)

- [classnames](https://npm.io/package/classnames.md) ^2.2.5
- [babel-runtime](https://npm.io/package/babel-runtime.md) ^6.11.6

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 1.1.0 (latest) — 2017-01-19
- 1.0.3 — 2017-01-03
- 1.0.2 — 2016-12-22
- 1.0.1 — 2016-12-22
- 1.0.0 — 2016-12-16

## README

[![AtlasKit component registry](https://img.shields.io/badge/AtlasKit-components-FF5230.svg)](http://aui-cdn.atlassian.com/atlaskit/registry/)
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://Commitizen.github.io/cz-cli/)
[![semantic-release](https://img.shields.io/badge/GitHub-semantic_release-ffab00.svg)](https://github.com/semantic-release/semantic-release)
[![Report an issue](https://img.shields.io/badge/Report-an_issue-6554C0.svg)](https://ecosystem.atlassian.net/browse/AK)
[![Ask in our forum](https://img.shields.io/badge/Ask-in_our_forum-6554C0.svg)](https://answers.atlassian.com/questions/ask?title=AtlasKit%3A%20&topics=atlaskit,ak-spinner,ak-spinner@1.1.0)

# Spinner

Spinners are used for showing a system process of unknown length going on that ends with the system displaying results to the user.

![Example spinner](https://bytebucket.org/atlassian/atlaskit/raw/be088d1ea7e5696f3b431dcd29a1fff59d6cef36/packages/ak-spinner/docs/spinnerExample.png)

## Try it out

Interact with a [live demo of the ak-spinner component](https://aui-cdn.atlassian.com/atlaskit/stories/ak-spinner/1.1.0/).

## Installation

```sh
npm install ak-spinner
```

## Using the component

Import the component in your React app as follows:

```
import Spinner from 'ak-spinner';
ReactDOM.render(<Spinner />, container);
```

The spinner will display a loading in animation and then continue spinning until the `isCompleting` prop is set on it.

If this prop is set to true the spinner will begin playing the outro animation (approximately 300ms).

You can be notified once the animation is complete by hooking into the `onComplete` callback like so.

```js
import Spinner from 'ak-spinner';

// some flag that we will set once our long running task is complete
let loadingFinishedFlag = false;

function loadingFinished() {
  // show our loaded content, etc
}

// this would normally be in a component or an app
ReactDOM.render(<Spinner
  isCompleting={loadingFinishedFlag}
  onComplete={loadingFinished}
/>);
```

The result is a very smooth loading in and out animation that should feel seamless to the user.



## Support and feedback

### We're here to help!

Let us know what you think of our components and docs, your feedback is really important for us.

### Community support

Ask a question in our [forum](https://answers.atlassian.com/questions/ask?title=AtlasKit%3A%20&topics=atlaskit,ak-spinner,ak-spinner@1.1.0).

Check [if someone has already asked the same question before](https://answers.atlassian.com/questions/topics/42926171/atlaskit).


### Create a support ticket

Are you in trouble? [Let us know](https://ecosystem.atlassian.net/browse/AK)!

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