Loaders

Published May 29, 2025 by kuvi41
Code Snippets
Loaders

⏳ Top Loaders & Spinners for Web and Mobile Apps

Loading animations help set expectations while your app is working behind the scenes. Below are must-use loaders categorized for React, Next.js, React Native, Android, and even plain HTML/CSS.

🌀 React / Next.js

  • react-loader-spinner: 40+ beautiful SVG loaders
    npm i react-loader-spinner

    Usage:
    <Oval color="#00BFFF" height={80} width={80} />
  • react-spinners: Collection of loading spinners (ClipLoader, BeatLoader)
    npm i react-spinners

    Usage:
    <ClipLoader color="#36D7B7" />
  • framer-motion: Animate loading transitions
    npm i framer-motion

    Usage: Animate components in and out while data loads.
  • tailwind CSS loader: Simple spinner using utility classes
    <div class="animate-spin h-8 w-8 border-4 border-blue-500 border-t-transparent rounded-full"></div>

📱 React Native

  • react-native-loading-spinner-overlay: Full screen overlay loader
    npm i react-native-loading-spinner-overlay

    Usage:
    <Spinner visible={true} textContent="Loading..." />
  • react-native-lottie: Use JSON animation files for loaders
    npm i lottie-react-native

    Usage: Combine with animated loader files from LottieFiles.com
  • ActivityIndicator (built-in): Native spinner
    <ActivityIndicator size="large" color="#0000ff" />

🤖 Android (Kotlin)

  • ProgressBar (XML): Built-in loader
    <ProgressBar
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      style="?android:attr/progressBarStyleLarge" />
  • Lottie Animation: Smooth animation loading
    implementation "com.airbnb.android:lottie:6.4.0"

    Use JSON files from LottieFiles

  • Shimmer Effect: Placeholder for data loading
    implementation "com.facebook.shimmer:shimmer:0.5.0"

🌐 Plain HTML/CSS

  • Pure CSS Spinner:
    <div style="border: 4px solid #ccc; border-top: 4px solid #333; border-radius: 50%; width: 40px; height: 40px; animation: spin 1s linear infinite;"></div>
    
    <style>
    @keyframes spin {
      0% { transform: rotate(0deg); }
      100% { transform: rotate(360deg); }
    }
    </style>
  • Loading.io: Free loader SVG/GIF/CSS assets
    Visit loading.io →

Use loaders wisely: match the brand, avoid overuse, and indicate progress clearly. 🚀