React Spinners is a comprehensive collection of declarative, customizable loading spinner components designed for React applications. Currently stable at version 0.17.0, it offers a diverse range of animated loaders to provide visual feedback during asynchronous operations. The library maintains an active development and release cadence, consistently delivering updates, bug fixes, and performance improvements. A significant distinguishing feature, introduced in version 0.13.0, is its complete elimination of external runtime dependencies, drastically reducing bundle size and improving overall project footprint. It provides robust TypeScript support, integrates seamlessly with modern React ecosystems, supports React versions from 16 through 19, and is optimized for tree-shaking.
npm install react-spinnersVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to import and use the ClipLoader component with state management for loading and color props, including CSS overrides.
Upgrade to `react-spinners@0.16.1` or higher, which reverts `barCount` to an optional prop. Alternatively, explicitly provide the `barCount` prop when using `ScaleLoader` in version `0.16.0`.
Upgrade to `react-spinners@0.17.0` or higher, which includes `"use client"` directives to ensure compatibility with RSC. For older versions, wrap spinner components in a client component or ensure their parent is marked as client-side.
Verify your build setup handles ES Module imports correctly. For legacy CommonJS environments, ensure your bundler (e.g., Webpack, Rollup) is configured to transpile or resolve ES Modules from `node_modules`.
To avoid the `HashLoader` color consistency bug, use `react-spinners@0.13.x` or upgrade to `react-spinners@0.15.0` or higher.
No direct fix needed, but be aware of the internal architectural change. If you previously had custom Emotion configurations interacting with `react-spinners`, those integrations might need review or removal as the library no longer uses Emotion.
Upgrade to `react-spinners@0.16.1` or higher, or explicitly pass a `barCount` prop (e.g., `<ScaleLoader barCount={5} />`) if locked to `v0.16.0`.Use ES Module named imports: `import { ClipLoader } from 'react-spinners';` instead of `const ClipLoader = require('react-spinners');`.Upgrade to `react-spinners@0.17.0` or higher, which includes necessary `"use client"` directives. For older versions, explicitly make the component a client component by adding `'use client';` at the top of its file, or render the spinner within a client-side wrapper component.
Downgrade to `react-spinners@0.13.x` or upgrade to `react-spinners@0.15.0` or newer to resolve this `HashLoader` specific coloring issue.