1.1.0 • Published 7 years ago

ak-spinner v1.1.0

Weekly downloads
-
License
Apache-2.0
Repository
bitbucket
Last release
7 years ago

AtlasKit component registry Commitizen friendly semantic-release Report an issue Ask in our forum

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

Try it out

Interact with a live demo of the ak-spinner component.

Installation

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.

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.

Check if someone has already asked the same question before.

Create a support ticket

Are you in trouble? Let us know!

1.1.0

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago