CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-react-spinners

A comprehensive collection of customizable React loading spinner components with TypeScript support

Pending
Overview
Eval results
Files

circular-spinners.mddocs/

Circular Spinners

Circular loading indicators with various animation patterns, perfect for general loading states and button spinners. These spinners use a single size property to control their dimensions.

Capabilities

ClipLoader

A clipped circle spinner with a rotating arc animation. One of the most popular and lightweight spinners.

/**
 * Clipped circle spinner with rotating arc animation
 * @param props - LoaderSizeProps with optional size configuration
 * @returns JSX.Element | null - Returns null when loading is false
 */
function ClipLoader(props: LoaderSizeProps): JSX.Element | null;

Default Values:

  • size: 35
  • color: "#000000"
  • loading: true
  • speedMultiplier: 1

Usage Examples:

import { ClipLoader } from "react-spinners";

// Basic usage
<ClipLoader loading={isLoading} color="#36d7b7" />

// Custom size and styling
<ClipLoader
  loading={true}
  color="#ff6b6b"
  size={60}
  cssOverride={{
    display: "block",
    margin: "0 auto",
  }}
/>

// Button spinner
<button disabled={submitting}>
  {submitting ? (
    <ClipLoader loading={true} size={16} color="#ffffff" />
  ) : (
    "Submit"
  )}
</button>

CircleLoader

A full circle spinner with a rotating border animation.

/**
 * Full circle spinner with rotating border animation
 * @param props - LoaderSizeProps with optional size configuration
 * @returns JSX.Element | null - Returns null when loading is false
 */
function CircleLoader(props: LoaderSizeProps): JSX.Element | null;

Default Values:

  • size: 50
  • color: "#000000"
  • loading: true
  • speedMultiplier: 1

Usage Examples:

import { CircleLoader } from "react-spinners";

// Default usage
<CircleLoader loading={isLoading} />

// Large circle with custom color
<CircleLoader
  loading={true}
  color="#007bff"
  size={80}
  cssOverride={{ margin: "20px auto" }}
/>

ClockLoader

A clock-like spinner with rotating hand animation.

/**
 * Clock-like spinner with rotating hand animation
 * @param props - LoaderSizeProps with optional size configuration
 * @returns JSX.Element | null - Returns null when loading is false
 */
function ClockLoader(props: LoaderSizeProps): JSX.Element | null;

Default Values:

  • size: 50
  • color: "#000000"
  • loading: true
  • speedMultiplier: 1

Usage Examples:

import { ClockLoader } from "react-spinners";

// Clock spinner for time-related operations
<ClockLoader loading={isProcessing} color="#28a745" size={40} />

// Slow clock animation
<ClockLoader
  loading={true}
  color="#6f42c1"
  size={70}
  speedMultiplier={0.5}
/>

BounceLoader

A bouncing circle animation with scale transformation.

/**
 * Bouncing circle animation with scale transformation
 * @param props - LoaderSizeProps with optional size configuration
 * @returns JSX.Element | null - Returns null when loading is false
 */
function BounceLoader(props: LoaderSizeProps): JSX.Element | null;

Default Values:

  • size: 60
  • color: "#000000"
  • loading: true
  • speedMultiplier: 1

Usage Examples:

import { BounceLoader } from "react-spinners";

// Fun bouncing animation
<BounceLoader loading={isLoading} color="#ff9800" />

// Large bounce with custom styling
<BounceLoader
  loading={true}
  color="#e91e63"
  size={100}
  cssOverride={{
    display: "block",
    margin: "0 auto",
    borderColor: "red",
  }}
/>

PuffLoader

A puffing circle animation that scales in and out.

/**
 * Puffing circle animation that scales in and out
 * @param props - LoaderSizeProps with optional size configuration
 * @returns JSX.Element | null - Returns null when loading is false
 */
function PuffLoader(props: LoaderSizeProps): JSX.Element | null;

Default Values:

  • size: 60
  • color: "#000000"
  • loading: true
  • speedMultiplier: 1

Usage Examples:

import { PuffLoader } from "react-spinners";

// Puffing animation
<PuffLoader loading={isUploading} color="#17a2b8" />

// Faster puff animation
<PuffLoader
  loading={true}
  color="#fd7e14"
  size={80}
  speedMultiplier={1.5}
/>

SquareLoader

A rotating square spinner.

/**
 * Rotating square spinner
 * @param props - LoaderSizeProps with optional size configuration
 * @returns JSX.Element | null - Returns null when loading is false
 */
function SquareLoader(props: LoaderSizeProps): JSX.Element | null;

Default Values:

  • size: 50
  • color: "#000000"
  • loading: true
  • speedMultiplier: 1

Usage Examples:

import { SquareLoader } from "react-spinners";

// Square spinner
<SquareLoader loading={isProcessing} color="#20c997" />

// Large square with slow rotation
<SquareLoader
  loading={true}
  color="#6610f2"
  size={75}
  speedMultiplier={0.7}
/>

SkewLoader

A skewed rectangle with rotation animation.

/**
 * Skewed rectangle with rotation animation
 * @param props - LoaderSizeProps with optional size configuration
 * @returns JSX.Element | null - Returns null when loading is false
 */
function SkewLoader(props: LoaderSizeProps): JSX.Element | null;

Default Values:

  • size: 20
  • color: "#000000"
  • loading: true
  • speedMultiplier: 1

Usage Examples:

import { SkewLoader } from "react-spinners";

// Skewed spinner (note smaller default size)
<SkewLoader loading={isLoading} color="#dc3545" />

// Larger skewed spinner
<SkewLoader
  loading={true}
  color="#343a40"
  size={35}
  cssOverride={{ transform: "scale(1.2)" }}
/>

RingLoader

Two overlapping rings with 3D rotation animations creating a complex spinning effect.

/**
 * Two overlapping rings with 3D rotation animations creating a complex spinning effect
 * @param props - LoaderSizeProps with size configuration
 * @returns JSX.Element | null - Returns null when loading is false
 */
function RingLoader(props: LoaderSizeProps): JSX.Element | null;

Default Values:

  • size: 60
  • color: "#000000"
  • loading: true
  • speedMultiplier: 1

Usage Examples:

import { RingLoader } from "react-spinners";

// 3D ring animation
<RingLoader loading={isLoading} color="#dc3545" />

// Large ring with custom styling
<RingLoader
  loading={true}
  color="#198754"
  size={80}
  cssOverride={{
    transform: "scale(1.1)",
  }}
/>

// Slow ring rotation
<RingLoader
  loading={true}
  color="#6610f2"
  size={70}
  speedMultiplier={0.7}
/>

MoonLoader

A circular loader with a small moon orbiting around a ring.

/**
 * A circular loader with a small moon orbiting around a ring
 * @param props - LoaderSizeProps with size configuration
 * @returns JSX.Element | null - Returns null when loading is false
 */
function MoonLoader(props: LoaderSizeProps): JSX.Element | null;

Default Values:

  • size: 60
  • color: "#000000"
  • loading: true
  • speedMultiplier: 1

Usage Examples:

import { MoonLoader } from "react-spinners";

// Moon orbiting animation
<MoonLoader loading={isLoading} color="#007bff" />

// Large moon loader
<MoonLoader
  loading={true}
  color="#6f42c1"
  size={80}
  cssOverride={{
    display: "block",
    margin: "0 auto",
  }}
/>

// Fast moon orbit
<MoonLoader
  loading={true}
  color="#dc3545"
  size={50}
  speedMultiplier={1.5}
/>

HashLoader

A hash-shaped loader with expanding and contracting animation.

/**
 * A hash-shaped loader with expanding and contracting animation
 * @param props - LoaderSizeProps with size configuration
 * @returns JSX.Element | null - Returns null when loading is false
 */
function HashLoader(props: LoaderSizeProps): JSX.Element | null;

Default Values:

  • size: 50
  • color: "#000000"
  • loading: true
  • speedMultiplier: 1

Usage Examples:

import { HashLoader } from "react-spinners";

// Hash animation
<HashLoader loading={isLoading} color="#28a745" />

// Large hash with custom styling
<HashLoader
  loading={true}
  color="#fd7e14"
  size={70}
  cssOverride={{
    filter: "drop-shadow(0 0 5px rgba(0,0,0,0.3))",
  }}
/>

// Slower hash animation
<HashLoader
  loading={true}
  color="#20c997"
  size={60}
  speedMultiplier={0.8}
/>

DotLoader

A rotating spinner with multiple dots around a circle.

/**
 * A rotating spinner with multiple dots around a circle
 * @param props - LoaderSizeProps with size configuration
 * @returns JSX.Element | null - Returns null when loading is false
 */
function DotLoader(props: LoaderSizeProps): JSX.Element | null;

Default Values:

  • size: 60
  • color: "#000000"
  • loading: true
  • speedMultiplier: 1

Usage Examples:

import { DotLoader } from "react-spinners";

// Rotating dots animation
<DotLoader loading={isLoading} color="#007bff" />

// Large dot circle
<DotLoader
  loading={true}
  color="#28a745"
  size={80}
  cssOverride={{
    display: "block",
    margin: "0 auto",
  }}
/>

// Fast rotation
<DotLoader
  loading={true}
  color="#dc3545"
  size={50}
  speedMultiplier={1.5}
/>

Common Patterns

Conditional Rendering

All circular spinners return null when loading={false}, making them perfect for conditional display:

// Spinner only shows when loading
{isLoading && <ClipLoader color="#36d7b7" />}

// Or use the loading prop
<ClipLoader loading={isLoading} color="#36d7b7" />

Responsive Sizing

Use CSS units or responsive values for different screen sizes:

<CircleLoader
  size="3rem"
  cssOverride={{
    fontSize: "clamp(16px, 4vw, 24px)",
  }}
/>

Accessibility

All spinners support ARIA attributes for screen readers:

<ClipLoader
  loading={true}
  color="#007bff"
  aria-label="Loading content"
  role="status"
  aria-live="polite"
/>

Install with Tessl CLI

npx tessl i tessl/npm-react-spinners

docs

bar-linear-spinners.md

circular-spinners.md

dot-beat-spinners.md

index.md

specialty-spinners.md

tile.json