A beautiful, production-ready React component library for canvas-based loader animations.
Built with TypeScript, SOLID principles, and designed for maximum developer experience. 69 unique loaders with advanced customization features.
- 🎨 69 Beautiful Loaders - Diverse collection of canvas-based animations
- 📦 TypeScript First - Full type safety and IntelliSense support
- ⚡ Highly Performant - Optimized canvas rendering at 60fps
- 🎭 Fully Customizable - Control colors, size, speed, and more
- 🎯 Per-Dot Styling - Customize individual dots by position/index/time
- 🌈 Gradient Support - Linear and radial gradients for backgrounds and dots
- 🌓 Theme Detection - Auto-detect system/next-themes preferences
- 🎭 SVG Mask Support - Apply custom SVG masks to loaders
- 🔧 SOLID Principles - Clean, maintainable architecture
- 🌳 Tree-shakeable - Import only what you need
- 💅 Zero Runtime Dependencies - Only React as peer dependency
- 🎮 Interactive Playground - Configure and generate code visually
npm install filoaders
# or
yarn add filoaders
# or
pnpm add filoadersimport { PulseWaveLoader } from 'filoaders';
import 'filoaders/styles.css';
function App() {
return <PulseWaveLoader size={180} dotColor="#3b82f6" />;
}Customize individual dots based on position, index, and animation state:
import { PulseWaveLoader, rainbowDots } from 'filoaders';
// Use preset
<PulseWaveLoader dotStyle={rainbowDots} />
// Custom styling
<PulseWaveLoader
dotStyle={({ index, time }) => ({
color: `hsl(${index * 10}, 70%, 60%)`,
opacity: 0.5 + Math.sin(time + index) * 0.5,
size: 1 + Math.sin(time) * 0.3,
})}
/>Apply beautiful gradients to backgrounds:
import { SpiralGalaxyLoader, gradientPresets } from 'filoaders';
// Use preset
<SpiralGalaxyLoader backgroundGradient={gradientPresets.sunset} />
// Custom gradient
<SpiralGalaxyLoader
backgroundGradient={{
type: 'radial',
stops: [
{ offset: 0, color: '#1e3a8a' },
{ offset: 1, color: '#000000' },
],
}}
/>Automatic theme detection with next-themes support:
<PulseWaveLoader
theme={{
mode: 'auto', // 'light' | 'dark' | 'auto'
lightColors: {
dotColor: '#000000',
backgroundColor: '#ffffff',
},
darkColors: {
dotColor: '#ffffff',
backgroundColor: '#000000',
},
}}
/>Apply custom SVG masks for creative effects:
import { BreathingGridLoader, maskPresets } from 'filoaders';
// Use preset
<BreathingGridLoader mask={maskPresets.heart} />
// Custom SVG
<BreathingGridLoader
mask={{
svg: `<svg viewBox="0 0 100 100">
<circle cx="50" cy="50" r="45" fill="white"/>
</svg>`,
scale: 0.9,
}}
/>Mix and match for stunning effects:
import {
RadiatingScanLoader,
rainbowDots,
gradientPresets,
maskPresets,
} from 'filoaders';
<RadiatingScanLoader
size={220}
dotStyle={rainbowDots}
backgroundGradient={gradientPresets.sunset}
mask={maskPresets.star}
theme={{ mode: 'auto' }}
/>📖 View Advanced Features Guide for complete documentation.
All loaders share a common props interface for consistency. Here's a selection organized by category:
PulseWaveLoader- Concentric dot rings with radial pulsePulseShockwaveLoader- Pulse wave with rotation effectInterwovenPulsesLoader- Independent ring pulsesCircularWavesLoader- Circular wave propagationPendulumWaveLoader- Pendulum-inspired wave motionRippleEffectLoader- Water ripple simulationInterconnectingWavesLoader- Interwoven wave patternsSequentialPulseLoader- Sequential pulse animationRadialPulseLoader- Radial pulse effectPulsatingCirclesLoader- Pulsating circular ringsPulseShockwaveLoader- Shockwave pulse effectPulsingGridLoader- Pulsing grid pattern
SpiralGalaxyLoader- Rotating spiral armsSpiralRadiatingLoader- Spiral with radiating pulseFibonacciSpiralLoader- Golden ratio spiralSilverSpiralLoader- Silver ratio spiralSunflowerSpiralLoader- Sunflower seed patternRotatingOrbitsLoader- Rotating orbital pathsConcentricRotationsLoader- Concentric rotating ringsOrbitalPulseLoader- Orbital pulse animation
BreathingGridLoader- Grid with radial expansionPulsingGridLoader- Pulsing grid patternInterferenceGridLoader- Wave interference patternHalftoneGradientLoader- Halftone dot patternVoronoiOrganicLoader- Voronoi diagram animation
SphereScanLoader- 3D sphere scan effectCrystallineRefractionLoader- Crystal refractionCrystallineCubeRefractionLoader- 3D cube refractionHelixScannerLoader- DNA helix scannerCylindricalAnalysisLoader- Cylindrical projectionVoxelMatrixMorphLoader- Voxel matrix morphingTriAxialGimbalLoader- 3D gimbal rotationScatterPlot3DLoader- 3D scatter plotPyramidDotLoader- Pyramid dot formationDNADoubleHelixLoader- DNA double helixTorusKnotFlowLoader- Torus knot topologyTesseract4DLoader- 4D hypercube projection
MobiusRibbonLoader- Möbius strip topologyPolarLissajousLoader- Lissajous curvesSphericalHarmonicsLoader- Spherical harmonicsLorenzAttractorLoader- Lorenz attractor chaosQuasicrystalPenroseLoader- Penrose tilingKleinBottleLoader- Klein bottle topologyQuantumOrbitalLoader- Quantum orbital patternsHopfFibrationLoader- Hopf fibrationAiryDiskLoader- Airy disk diffractionNewtonsCraddleLoader- Newton's cradle physicsDoublePendulumChaosLoader- Chaotic double pendulum
FlowingEnergyLoader- Flowing energy bandsReactionDiffusionLoader- Reaction-diffusion systemBinaryTreeGrowthLoader- Binary tree growthVoronoiOrganicLoader- Organic Voronoi cellsFerrofluidSpikesLoader- Ferrofluid spike simulationFluidOrbLoader- Fluid dynamics orb
RadiatingScanLoader- Rotating scan linesSonarSweepLoader- Sonar sweep effectPhasedArrayEmitterLoader- Phased array emissionSphereScanLoader- Spherical scan
ConcentricRingsLoader- Concentric ring animationSequentialRingsLoader- Sequential ring appearanceStretchedRingsLoader- Radially stretched ringsExpandingLinesLoader- Expanding line segmentsPulsatingCirclesLoader- Pulsating circles
BouncingProgressBarLoader- Bouncing progress barBouncingBarGraphLoader- Animated bar graphECGHeartbeatLoader- ECG heartbeat monitorPlaceholderSkeletonLoader- Skeleton placeholderTripleBouncingDotsLoader- Three bouncing dotsOscillatingDotsLoader- Oscillating dot patternMandelbrotZoomLoader- Mandelbrot set zoomBlackHoleAccretionLoader- Black hole accretion disk
View the complete list with live demos in the Interactive Playground
All loaders accept these props:
| Prop | Type | Default | Description |
|---|---|---|---|
size |
number |
180 |
Canvas size in pixels |
animationSpeed |
number |
1 |
Animation speed multiplier (0.1-3) |
dotColor |
string |
'#ffffff' |
Primary color for dots/elements |
backgroundColor |
string |
'transparent' |
Canvas background color |
className |
string |
'' |
Additional CSS classes |
opacity |
number |
1 |
Global opacity (0-1) |
paused |
boolean |
false |
Pause the animation |
onAnimationFrame |
(time: number) => void |
undefined |
Callback on each frame |
| Prop | Type | Default | Description |
|---|---|---|---|
dotStyle |
DotStyleFunction |
undefined |
Function to customize individual dots |
dotGradientConfig |
GradientConfig |
undefined |
Gradient configuration for dots |
backgroundGradient |
GradientConfig |
undefined |
Gradient configuration for background |
theme |
ThemeConfig |
undefined |
Theme detection and color switching |
mask |
SVGMaskConfig |
undefined |
SVG mask to apply to the loader |
See ADVANCED_FEATURES.md for detailed documentation on advanced props.
import { PulseWaveLoader } from 'filoaders';
import 'filoaders/styles.css';
function LoadingScreen() {
return (
<div style={{ display: 'flex', justifyContent: 'center', padding: '50px' }}>
<PulseWaveLoader />
</div>
);
}<PulseWaveLoader
size={200}
dotColor="#3b82f6"
backgroundColor="#000000"
/><SpiralGalaxyLoader
animationSpeed={2} // 2x speed
size={180}
/>function ControlledLoader() {
const [paused, setPaused] = useState(false);
return (
<div>
<button onClick={() => setPaused(!paused)}>
{paused ? 'Resume' : 'Pause'}
</button>
<PulseWaveLoader paused={paused} />
</div>
);
}<PulseWaveLoader
onAnimationFrame={(time) => {
console.log(`Animation time: ${time}s`);
}}
/>import {
PulseWaveLoader,
SpiralGalaxyLoader,
BreathingGridLoader,
} from 'filoaders';
function LoaderShowcase() {
return (
<div style={{ display: 'flex', gap: '20px' }}>
<PulseWaveLoader dotColor="#3b82f6" />
<SpiralGalaxyLoader dotColor="#10b981" />
<BreathingGridLoader dotColor="#ef4444" />
</div>
);
}Filoaders is built with SOLID principles:
- Single Responsibility: Each loader handles one animation type
- Open/Closed: Extensible through props, closed for modification
- Liskov Substitution: All loaders are interchangeable via BaseLoaderProps
- Interface Segregation: Common interface with optional specific props
- Dependency Inversion: Components depend on abstractions (hooks/utils)
src/
├── types/ # TypeScript interfaces
├── utils/ # Shared utilities
│ ├── canvas.ts # Canvas helpers
│ ├── colors.ts # Color management
│ └── animation.ts # Animation utilities
├── components/
│ ├── BaseLoader/ # Base animation hook
│ └── [LoaderName]/ # Individual loaders
└── index.ts # Main exports
# Clone the repo
git clone https://github.com/your-org/filoaders.git
cd filoaders
# Install dependencies
yarn install# Run demo app with Vite
yarn dev
# Launch Storybook
yarn storybook
# Build library for production
yarn build
# Build Storybook for deployment
yarn build-storybookThe demo app (/demo) showcases all loaders with live controls:
- Adjust size, speed, opacity
- Change colors in real-time
- Pause/resume animations
- Test different configurations
Interactive component documentation with:
- Individual loader stories
- Prop controls
- Color variants
- Usage examples
Full TypeScript support with exported types:
import type {
BaseLoaderProps,
PulseWaveLoaderProps,
AnimationState,
RingConfig,
} from 'filoaders';
const loaderProps: PulseWaveLoaderProps = {
size: 180,
dotColor: '#ffffff',
animationSpeed: 1,
};const theme = {
primary: '#3b82f6',
secondary: '#8b5cf6',
success: '#10b981',
error: '#ef4444',
};
<PulseWaveLoader dotColor={theme.primary} />function ResponsiveLoader() {
const size = useWindowSize();
const loaderSize = size.width < 768 ? 120 : 180;
return <PulseWaveLoader size={loaderSize} />;
}- Canvas-based rendering for smooth 60fps animations
- RequestAnimationFrame for optimal performance
- Automatic cleanup on unmount
- No layout thrashing - pure canvas operations
Contributions are welcome! Please read our contributing guidelines.
MIT © [Your Name]
Built with ❤️ using TypeScript, React, and Canvas API