Socket
Socket
Sign inDemoInstall

@atlaskit/spinner

Package Overview
Dependencies
Maintainers
1
Versions
149
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@atlaskit/spinner

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


Version published
Weekly downloads
94K
increased by4.65%
Maintainers
1
Weekly downloads
 
Created
Source

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 @atlaskit/spinner component.

Installation

npm install @atlaskit/spinner

Using the component

Import the component in your React app as follows:

import Spinner from '@atlaskit/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 '@atlaskit/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!

Keywords

FAQs

Package last updated on 03 Mar 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc