Spinner

A spinner is an animated spinning icon that lets users know content is being loaded.

20.4.1

Patch Changes

  • Updated dependencies

20.4.0

Minor Changes

Patch Changes

  • Updated dependencies

20.3.1

Patch Changes

  • a898abf54b1bd, (opens new window) - Experimental React 19 support: widen the peer dependency range, use React 19 in development, and fix the spinner visual examples' React 19 warnings. Test coverage remains partial.

20.3.0

Minor Changes

  • d82e6f76528ab, (opens new window) - Add direct subpath package exports as part of the linking-platform, search, media, and design-system barrel-removal (de-barrel) migration.

    These packages now expose their individual modules via explicit package.json exports subpaths so that consumers can import directly from the leaf module (e.g. @atlaskit/pkg/thing) instead of the package barrel/index. This adds new public entry points without changing or removing any existing exports, so it is a backwards-compatible additive change.

    No runtime behaviour changes; this is an API-surface (entry-point) addition to support tree-shaking and to unblock removal of the barrel index files.

Patch Changes

  • Updated dependencies

20.2.0

Minor Changes

20.1.2

Patch Changes

  • e2628936f7249, (opens new window) - Fixed the delay prop so a delayed Spinner renders nothing until the delay elapses. It previously painted a static, complete circle for the whole delay window.

20.1.1

Patch Changes

  • Updated dependencies

20.1.0

Minor Changes

  • cd097a2111788, (opens new window) - Republish packages depending on @atlaskit/react-compiler-gating so their published dependency reference is updated to the renamed @atlaskit/react-compiler-gating scope.

    The earlier rename of @atlassian/react-compiler-gating to @atlaskit/react-compiler-gating only bumped the renamed package itself, so dependent packages were never republished and their published versions still referenced the old @atlassian/react-compiler-gating name, which is not available in the public npm registry. This minor bump republishes all affected packages with the corrected dependency.

Patch Changes

  • Updated dependencies

20.0.1

Patch Changes

20.0.0

Major Changes

  • f2dc9097319f0, (opens new window) - ### Dropped support for legacy Typescript 4 types. Typescript 5 is now the new minimum.

    Removes the typesVersions property and dist/types-ts4.5 directory from the dist.

    Types are now exclusively via the "types": "dist/types/index.d.ts" property.

    - "typesVersions": { - ">=4.5 <4.9": { - "*": [ - "dist/types-ts4.5/*", - "dist/types-ts4.5/index.d.ts" - ] - } - },

Patch Changes

  • Updated dependencies

19.1.2

Patch Changes

  • Updated dependencies

19.1.1

Patch Changes

  • Updated dependencies

19.1.0

Minor Changes

19.0.14

Patch Changes

19.0.13

Patch Changes

19.0.12

Patch Changes

19.0.11

Patch Changes

  • Updated dependencies

19.0.10

Patch Changes

  • Updated dependencies

19.0.9

Patch Changes

  • Updated dependencies

19.0.8

Patch Changes

  • Updated dependencies

19.0.7

Patch Changes

  • Updated dependencies

19.0.6

Patch Changes

  • Updated dependencies

19.0.5

Patch Changes

19.0.4

Patch Changes

  • Updated dependencies

19.0.3

Patch Changes

  • Updated dependencies

19.0.2

Patch Changes

19.0.1

Patch Changes

  • Updated dependencies

19.0.0

Major Changes

18.0.6

Patch Changes

  • Updated dependencies

18.0.5

Patch Changes

  • Updated dependencies

18.0.4

Patch Changes

18.0.3

Patch Changes

18.0.2

Patch Changes

18.0.1

Patch Changes

  • Updated dependencies

18.0.0

Major Changes

Patch Changes

  • Updated dependencies

17.2.0

Minor Changes

17.1.2

Patch Changes

  • Updated dependencies

17.1.1

Patch Changes

  • Updated dependencies

17.1.0

Minor Changes

Patch Changes

  • Updated dependencies

17.0.0

Major Changes

  • #102543, (opens new window) 497efb1c63b02, (opens new window) - Migrated from @emotion/react to @compiled/react in order to improve performance, align with the rest of the Atlaskit techstack, and support React 18 Streaming SSR.

    Please note, in order to use this version of @atlaskit/spinner, you will need to ensure that your bundler is configured to handle .css imports correctly. Most bundlers come with built-in support for .css imports, so you may not need to do anything. If you are using a different bundler, please refer to the documentation for that bundler to understand how to handle .css imports.

    For more information on the migration, please refer to RFC-73 Migrating our components to Compiled CSS-in-JS, (opens new window).

16.3.6

Patch Changes

16.3.5

Patch Changes

  • Updated dependencies

16.3.4

Patch Changes

16.3.3

Patch Changes

  • Updated dependencies

16.3.2

Patch Changes

  • Updated dependencies

16.3.1

Patch Changes

  • Updated dependencies

16.3.0

Minor Changes

  • #127511, (opens new window) db30e29344013, (opens new window) - Widening range of react and react-dom peer dependencies from ^16.8.0 || ^17.0.0 || ~18.2.0 to the wider range of ``^16.8.0 || ^17.0.0 || ^18.0.0` (where applicable).

    This change has been done to enable usage of react@18.3 as well as to have a consistent peer dependency range for react and react-dom for /platform packages.

Patch Changes

  • Updated dependencies

16.2.0

Minor Changes

16.1.0

Minor Changes

16.0.4

Patch Changes

16.0.3

Patch Changes

16.0.2

Patch Changes

16.0.1

Patch Changes

16.0.0

Major Changes

15.6.1

Patch Changes

15.6.0

Minor Changes

15.5.4

Patch Changes

15.5.3

Patch Changes

15.5.2

Patch Changes

15.5.1

Patch Changes

15.5.0

Minor Changes

Patch Changes

  • Updated dependencies

15.4.0

Minor Changes

15.3.4

Patch Changes

  • Updated dependencies

15.3.3

Patch Changes

15.3.2

Patch Changes

  • Updated dependencies

15.3.1

Patch Changes

  • Updated dependencies

15.3.0

Minor Changes

Patch Changes

  • Updated dependencies

15.2.1

Patch Changes

  • Updated dependencies

15.2.0

Minor Changes

15.1.17

Patch Changes

15.1.16

Patch Changes

15.1.15

Patch Changes

15.1.14

Patch Changes

15.1.13

Patch Changes

15.1.12

Patch Changes

15.1.11

Patch Changes

  • Updated dependencies

15.1.10

Patch Changes

15.1.9

Patch Changes

  • Updated dependencies

15.1.8

Patch Changes

  • Updated dependencies

15.1.7

Patch Changes

15.1.6

Patch Changes

15.1.5

Patch Changes

  • Updated dependencies

15.1.4

Patch Changes

15.1.3

Patch Changes

  • Updated dependencies

15.1.2

Patch Changes

  • Updated dependencies

15.1.1

Patch Changes

  • Updated dependencies

15.1.0

Minor Changes

  • #13302, (opens new window) 97d5fe7100c, (opens new window) - Instrumented Spinner with the new theming package, @atlaskit/tokens.

    Tokens will be visible only in applications configured to use the new Tokens API (currently in alpha).

    These changes are intended to be interoperable with the legacy theme implementation. Legacy dark mode users should expect no visual or breaking changes.

Patch Changes

  • Updated dependencies

15.0.11

Patch Changes

15.0.10

Patch Changes

  • #12654, (opens new window) d2cf99ba208, (opens new window) - [ux] Fixes two regressions introduced in v15.0.8:
    • There was a bug in the xsmall size variant of Spinner where the Spinner path appeared flipped, making the rotation look like the axis was off.
    • The addition of a wrapping span and layout change from inline to inline-block in v15.0.8 shifted the spinner down slightly, causing potential flickers when scrollbars appear as content overflows in very tight layout scenarios. Please note that if you are using a Spinner in the iconBefore, iconAfter or overlay props of @atlaskit/button to create custom loading experiences, you are encouraged to move to using our dedicated LoadingButton, (opens new window) component; this takes care of all UX concerns for you, and ensures a smooth upgrade path for you in the future.

15.0.9

Patch Changes

15.0.8

Patch Changes

  • #9756, (opens new window) 7be17d84c4a, (opens new window) - Fix performance degradation caused by styles being continually re-calculated for the SVG animation. Fix a bug in which the Spinner was set to inline instead of inline-block. This reverts the component's layout behavior to version 12.
  • Updated dependencies

15.0.7

Patch Changes

15.0.6

Patch Changes

15.0.5

Patch Changes

15.0.4

Patch Changes

  • Updated dependencies

15.0.3

Patch Changes

15.0.2

Patch Changes

15.0.1

Patch Changes

15.0.0

Major Changes

Patch Changes

  • Updated dependencies

14.0.0

Major Changes

  • #2137, (opens new window) 206be3a0cb, (opens new window) - In this version we made spinner dramatically faster and lighter 🤩

    Fix: Mounting animation

    The mounting animation for spinner has been fixed. There are three parts to the mounting spinner animation:

    1. Accelerated spin
    2. Fade in
    3. Stretch (the spinner starts small and grows to a bigger size)

    In 12.x the fade in and stretch parts of the animation were broken 😢. These have been fixed in 13.0.0 🤘

    Changes

    See below for information about a codemod we created to automatically upgrade usages of spinner ❤️

    There have been a number of breaking changes in 13.0.0.

    • Spinner no longer has a peerDependency on styled-components@3. Internally spinner is now using @emotion/core for styling
    • Added new ref prop which returns the ref of the spinner svg using React.forwardRef
    • Improved dark mode support (not that dark mode is truly supported yet). appearance="invert" will now invert the colors of the spinner in dark mode. Previously appearance="invert" in dark mode did nothing.
    • The default delay prop value has been reduced from 100ms to 0ms. The delay was previously designed to prevent the spinner from flickering if async content becomes quickly visible. Now that the fade in animation is working correctly, the spinner is only 2% visible at 100ms.
    • The delay prop is no longer useful to prevent "quick flickering" so the default has been changed. We have created a guide to assist you with better understanding how to use delays, as well as provided new guidance on how to cross fade a spinner with other loading content.
    • The invertColor={boolean} prop has been renamed to appearance="inherit | invert" to bring it into line with other components. This is useful when you are displaying a spinner on a background that is not the same background color scheme as the body.
    • Changing name of the SpinnerSizes type to Size. Most people are not using this type directly
    • isCompleting and onComplete props have been removed. Spinner no longer manages it's own unmount animations. If you want to have graceful unmounting we now have a recommended pattern which leverages our general purpose and performant @atlaskit/motion package. (Note: spinner will always animate itself in, you don't need to set anything up).

    Automatic upgrading

    # You first need to have the latest spinner installed before you can run the codemod yarn upgrade @atlaskit/spinner@^13.0.0 # Run the codemod cli # Pass in a parser for your codebase npx @atlaskit/codemod-cli /path/to/target/directory --parser [tsx | flow | babel]

    Notes

    • You first need to upgrade to 13.0.0 before you run the codemod cli. This is because the cli will look in your local node_modules for the codemod which is published inside the spinner package.
    • The codemod is pretty clever, and will respect aliasing as well as using custom naming for the default import 🤘

    Feel the power

    What the codemod will do:

    • delay: replace literal number values equal to or less than 150ms as they are no longer needed to avoid flickering
    - <Spinner delay={0} /> + <Spinner /> - <Spinner delay={100} /> + <Spinner /> - <Spinner delay={150} /> + <Spinner /> // no change <Spinner delay={151} /> <Spinner delay={myValue} />
    • invertColor: automatically changed over to appearance="inherit | invert". All existing logic will be preserved in your code
    - <Spinner invertColor /> + <Spinner appearance="invert" /> - <Spinner invertColor={false} /> + <Spinner /> - <Spinner invertColor={true} /> + <Spinner appearance="invert" /> - <Spinner invertColor={expression} /> + <Spinner appearance={expression ? "invert" : "inherit"} />
    • isCompleting and onComplete: removing props. But it will not remove the state or functions associated with those props. We cannot automatically remove the values or control flow associated with these props. If you were using isCompleting or onComplete props there will be manual intervention required.
    function App() { const [isCompleting] = useState(false); const onComplete = () => {}; - return ( - <Spinner - isCompleting={isCompleting} - onComplete={() => { - console.log('on complete!'); - onComplete(); - }} - delay={1000} - /> - ); + return <Spinner delay={1000} />; }

    If you were using onComplete for control flow, we now recommend using the performant and standard @atlaskit/motion solution

    import React, { useState } from 'react'; import Spinner from '@atlaskit/spinner'; import appLoaded from './control-flow'; function App() { const [isLoading, setIsLoading] = useState(true); // faking the end of a loading event useEffect(() => { const id = setTimeout(() => setIsLoading(false), 1000); return () => clearTimeout(id); }, []); return <Spinner isCompleting={!isLoading} onComplete={appLoaded} />; } import React, {useState} from 'react'; import Spinner from '@atlaskit/spinner'; import { ExitingPersistence, FadeIn } from '@atlaskit/motion'; import appLoaded from './control-flow'; function App() { const [isLoading, setIsLoading] = useState(true); // faking the end of a loading event useEffect(() => { const id = setTimeout(() => setIsLoading(false), 1000); return () => clearTimeout(id); }, []); const onFinish = useCallback((state) => { if(state === 'exiting') { appLoaded(); } }, []); return ( <ExitingPersistence> {isLoading && ( <FadeIn onFinish={onFinish}> {props => ( <span {...props}> <Spinner size="xlarge" /> </span> )} </FadeIn> )} <ExitingPersistence> ); }
    • SpinnerSizes type: automatically shifted over to a new name: Size

13.0.1

Patch Changes

13.0.0

Major Changes

  • 206be3a0cb, (opens new window) - In this version we made spinner dramatically faster and lighter 🤩

    Fix: Mounting animation

    The mounting animation for spinner has been fixed. There are three parts to the mounting spinner animation:

    1. Accelerated spin
    2. Fade in
    3. Stretch (the spinner starts small and grows to a bigger size)

    In 12.x the fade in and stretch parts of the animation were broken 😢. These have been fixed in 13.0.0 🤘

    Changes

    See below for information about a codemod we created to automatically upgrade usages of spinner ❤️

    There have been a number of breaking changes in 13.0.0.

    • Spinner no longer has a peerDependency on styled-components@3. Internally spinner is now using @emotion/core for styling
    • Added new ref prop which returns the ref of the spinner svg using React.forwardRef
    • Improved dark mode support (not that dark mode is truly supported yet). appearance="invert" will now invert the colors of the spinner in dark mode. Previously appearance="invert" in dark mode did nothing.
    • The default delay prop value has been reduced from 100ms to 0ms. The delay was previously designed to prevent the spinner from flickering if async content becomes quickly visible. Now that the fade in animation is working correctly, the spinner is only 2% visible at 100ms.
    • The delay prop is no longer useful to prevent "quick flickering" so the default has been changed. We have created a guide to assist you with better understanding how to use delays, as well as provided new guidance on how to cross fade a spinner with other loading content.
    • The invertColor={boolean} prop has been renamed to appearance="inherit | invert" to bring it into line with other components. This is useful when you are displaying a spinner on a background that is not the same background color scheme as the body.
    • Changing name of the SpinnerSizes type to Size. Most people are not using this type directly
    • isCompleting and onComplete props have been removed. Spinner no longer manages it's own unmount animations. If you want to have graceful unmounting we now have a recommended pattern which leverages our general purpose and performant @atlaskit/motion package. (Note: spinner will always animate itself in, you don't need to set anything up).

    Automatic upgrading

    # You first need to have the latest spinner installed before you can run the codemod yarn upgrade @atlaskit/spinner@^13.0.0 # Run the codemod cli # Pass in a parser for your codebase npx @atlaskit/codemod-cli /path/to/target/directory --parser [tsx | flow | babel]

    Notes

    • You first need to upgrade to 13.0.0 before you run the codemod cli. This is because the cli will look in your local node_modules for the codemod which is published inside the spinner package.
    • The codemod is pretty clever, and will respect aliasing as well as using custom naming for the default import 🤘

    Feel the power

    What the codemod will do:

    • delay: replace literal number values equal to or less than 150ms as they are no longer needed to avoid flickering
    - <Spinner delay={0} /> + <Spinner /> - <Spinner delay={100} /> + <Spinner /> - <Spinner delay={150} /> + <Spinner /> // no change <Spinner delay={151} /> <Spinner delay={myValue} />
    • invertColor: automatically changed over to appearance="inherit | invert". All existing logic will be preserved in your code
    - <Spinner invertColor /> + <Spinner appearance="invert" /> - <Spinner invertColor={false} /> + <Spinner /> - <Spinner invertColor={true} /> + <Spinner appearance="invert" /> - <Spinner invertColor={expression} /> + <Spinner appearance={expression ? "invert" : "inherit"} />
    • isCompleting and onComplete: removing props. But it will not remove the state or functions associated with those props. If you where using those props there will be manual intervention required. We cannot reasonably trace back and remove these values as they could be used for other purposes.

    NOTE: values associated with isCompleting and onComplete props are not removed, just the props on the Spinner component

    function App() { const [isCompleting] = useState(false); const onComplete = () => {}; - return ( - <Spinner - isCompleting={isCompleting} - onComplete={() => { - console.log('on complete!'); - onComplete(); - }} - delay={1000} - /> - ); + return <Spinner delay={1000} />; }
    • SpinnerSizes type: automatically shifted over to a new name: Size

Patch Changes

12.1.7

Patch Changes

  • Updated dependencies

12.1.6

Patch Changes

12.1.5

Patch Changes

12.1.4

Patch Changes

12.1.3

Patch Changes

12.1.2

Patch Changes

  • [patch]d222c2b987, (opens new window):

    Theme has been converted to Typescript. Typescript consumers will now get static type safety. Flow types are no longer provided.

    Breaking

    ** getTokens props changes ** When defining the value function passed into a ThemeProvider, the getTokens parameter cannot be called without props; if no props are provided an empty object {} must be passed in:

    <CustomTheme.Provider value={t => ({ ...t(), backgroundColor: '#333'})} >

    becomes:

    <CustomTheme.Provider value={t => ({ ...t({}), backgroundColor: '#333'})} >

    ** Color palette changes ** Color palettes have been moved into their own file. Users will need to update imports from this:

    import { colors } from '@atlaskit/theme'; colors.colorPalette('8');

    to this:

    import { colorPalette } from '@atlaskit/theme'; colorPalette.colorPalette('8');

    or for multi entry-point users:

    import * as colors from '@atlaskit/theme/colors'; colors.colorPalette('8');

    to this:

    import * as colorPalettes from '@atlaskit/theme/color-palette'; colorPalettes.colorPalette('8');

12.1.1

Patch Changes

12.1.0

Minor Changes

  • [minor]808d37259d, (opens new window):

    Adding an optional prop testId that will set the attribute value data-testid. It will help products to write better integration and end to end tests.

12.0.9

Patch Changes

  • [patch]097b696613, (opens new window):

    Components now depend on TS 3.6 internally, in order to fix an issue with TS resolving non-relative imports as relative imports

12.0.8

Patch Changes

12.0.7

Patch Changes

12.0.6

Patch Changes

12.0.5

Patch Changes

12.0.4

Patch Changes

12.0.3

Patch Changes

12.0.2

Patch Changes

12.0.1

  • [patch]b0ef06c685, (opens new window):
    • This is just a safety release in case anything strange happened in in the previous one. See Pull Request #5942 for details

12.0.0

  • [major]215688984e, (opens new window):
    • @atlaskit/spinner has been converted to Typescript. Typescript consumers will now get static type safety. Flow types are no longer provided. No API or behavioural changes.

11.0.0

  • [major]7c17b35107, (opens new window):
    • Updates react and react-dom peer dependencies to react@^16.8.0 and react-dom@^16.8.0. To use this package, please ensure you use at least this version of react and react-dom.

10.0.7

10.0.6

10.0.5

10.0.4

10.0.3

10.0.2

10.0.1

10.0.0

  • [major]76299208e6, (opens new window):

    • Drop ES5 from all the flow modules

    Dropping CJS support in all @atlaskit packages

    As a breaking change, all @atlaskit packages will be dropping cjs distributions and will only distribute esm. This means all distributed code will be transpiled, but will still contain import and export declarations.

    The major reason for doing this is to allow us to support multiple entry points in packages, e.g:

    import colors from `@atlaskit/theme/colors`;

    Previously this was sort of possible for consumers by doing something like:

    import colors from `@atlaskit/theme/dist/esm/colors`;

    This has a couple of issues. 1, it treats the file system as API making internal refactors harder, we have to worry about how consumers might be using things that aren't actually supposed to be used. 2. We are unable to do this internally in @atlaskit packages. This leads to lots of packages bundling all of theme, just to use a single color, especially in situations where tree shaking fails.

    To support being able to use multiple entrypoints internally, we unfortunately cannot have multiple distributions as they would need to have very different imports from of their own internal dependencies.

    ES Modules are widely supported by all modern bundlers and can be worked around in node environments.

    We may choose to revisit this solution in the future if we find any unintended condequences, but we see this as a pretty sane path forward which should lead to some major bundle size decreases, saner API's and simpler package architecture.

    Please reach out to #fabric-build (if in Atlassian) or create an issue in Design System Support, (opens new window) (for external) if you have any questions or queries about this.

9.0.13

9.0.12

9.0.11

9.0.10

9.0.9

9.0.8

9.0.6

9.0.5

9.0.4

9.0.3

9.0.2

9.0.1

9.0.0

8.0.0

7.1.1

7.1.0

7.0.2

7.0.1

7.0.0

6.0.1

6.0.0

5.0.2

5.0.0

4.2.1

4.2.0

4.1.5

4.1.4

4.1.3

4.1.2

4.1.1

4.1.0

4.0.6

4.0.2 (2017-10-26)

4.0.1 (2017-10-22)

4.0.0 (2017-08-29)

3.4.2 (2017-07-27)

3.4.1 (2017-07-25)

3.1.0 (2017-07-17)

3.0.0 (2017-07-07)

  • fix; refactor spinner to use TransitionGroup (e0cef25, (opens new window))
  • breaking; remove typescript interface file. when a spinner's isCompleting props is true and it has finished its exit animation it will not longer take up space in the DOM.
  • ISSUES CLOSED: AK-2559

2.2.5 (2017-06-28)

2.2.4 (2017-06-27)

2.2.3 (2017-05-29)

2.2.2 (2017-05-25)

2.2.1 (2017-05-08)

2.2.0 (2017-05-06)

2.1.0 (2017-05-02)

2.0.3 (2017-04-27)

2.0.2 (2017-04-26)

2.0.1 (2017-03-28)

2.0.0 (2017-03-27)

1.0.5 (2017-03-22)

1.0.3 (2017-03-21)

1.0.2 (2017-03-03)

1.0.1 (2017-02-07)

Was this page helpful?
We use this feedback to improve our documentation.
© 2026 AtlassianTrademark, (opens new window)Privacy, (opens new window)License