Spinner

The Spinner component provides a visual loading indicator with a smooth ring animation. It's built using SVG animations for optimal performance and customization.

Props

PropTypeDefaultDescription
sizenumber24Size of the spinner in pixels
classNamestring-Additional CSS classes
styleCSSProperties-Inline styles
...svg propsSVGProps<SVGSVGElement>-All native SVG props are supported

Overview

Spinners are used to indicate loading states or ongoing processes. They provide visual feedback to users that the application is working on their request.

Basic Usage

Loading...Loading...Loading...
// Default spinner
<Spinner />

// Medium spinner
<Spinner size={32} />

// Large spinner
<Spinner size={48} />

Custom Styling

Loading...Loading...Loading...Loading...
// Custom colors using className
<Spinner className="text-blue-500" />
<Spinner className="text-green-500" size={32} />
<Spinner className="text-red-500" size={48} />

// Custom color using style
<Spinner style={{ color: '#8B5CF6' }} size={32} />