LoadingSpinner
A collection of fully animated loading spinner components with multiple variants (dots, circle, pulse, bounce, bars), customizable sizes, and colors.
Variants
Circle
Dots
Pulse
Bounce
Bars
Sizes
Small
Medium
Large
Colors
Installation
Install using our CLI tool (recommended):
Terminal
1npx mixcn-ui add loadingspinnerImport
Component.tsx
1import { LoadingSpinner } from "@components/customComponents/LoadingSpinner";Props
| Name | Type | Default | Description |
|---|---|---|---|
| variant | 'dots' | 'circle' | 'pulse' | 'bounce' | 'bars' | circle | The variant/style of the loading spinner |
| size | 'sm' | 'md' | 'lg' | md | The size of the spinner |
| color | string | currentColor | The color of the spinner (accepts CSS color values) |
| className | string | - | Additional CSS classes |
Examples
All Variants
Variants
Circle
Dots
Pulse
Bounce
Bars
Sizes
Small
Medium
Large
Colors
All Variants.tsx
1import LoadingSpinner from "@/components/uiComponents/LoadingSpinner";
2
3export default function Example() {
4 return (
5 <div className="flex gap-8">
6 <LoadingSpinner variant="circle" />
7 <LoadingSpinner variant="dots" />
8 <LoadingSpinner variant="pulse" />
9 <LoadingSpinner variant="bounce" />
10 <LoadingSpinner variant="bars" />
11 </div>
12 );
13}Different Sizes
Different Sizes.tsx
1<div className="flex gap-8 items-center">
2 <LoadingSpinner size="sm" />
3 <LoadingSpinner size="md" />
4 <LoadingSpinner size="lg" />
5</div>Custom Colors
Custom Colors.tsx
1<div className="flex gap-8 items-center">
2 <LoadingSpinner color="#3b82f6" />
3 <LoadingSpinner color="#8b5cf6" />
4 <LoadingSpinner color="#ec4899" />
5</div>