React Loadly Loading States

    1

    Build loading states in React and Next.js with react-loadly: Skeletonize, skeleton screens, spinners and loading/error/empty switching.

    Free

    3 usesSecurity scanned

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    React Loadly Loading States

    Example session with this skill installed

    Create a loading state for a user profile card. Wrap the UserCard component so it skeletons while loading, and use a circular loader for the avatar.

    • Read your context and instructions
    • Compiled the react loadly loading
    • Generated the UI component

    I have implemented a skeleton loading state for the user profile card using react-loadly. I used the Skeletonize wrapper for the main card to ensure the layout matches the final UI, and defined a placeholder user object to maintain structure during the loading phase.

    Profile Card Loading Implementation

    "use client";
    
    import React from "react";
    import { Skeletonize, SkeletonGroupLoader, SkeletonLoader } from "react-loadly";
    import { UserCard } from "./UserCard";
    
    // Mock data to maintain layout structure during skeletonization
    const placeholderUser = {
      name: "Loading Name",
      role: "Loading Role",
      bio: "This is a placeholder for the user bio text that will appear once data is fetched.",
      avatar: ""
    };
    
    export function ProfileCard({ user, isLoading }) {
      return (
        <Skeletonize 
          loading={isLoading} 
          loadingLabel="Loading user profile"
          animation="shimmer"
        >
          <UserCard user={user ?? placeholderUser} />
        </Skeletonize>
      );
    }
    
    // Manual skeleton for custom shell layout if needed
    export function ProfileShellSkeleton() {
      return (
        <div className="p-4 border rounded-lg">
          <SkeletonGroupLoader shimmerSync stagger={0.1}>
            <div className="flex items-center space-x-4">
              <SkeletonLoader variant="circular" width={60} height={60} />
              <div className="flex-1">
                <SkeletonLoader variant="text" width="60%" height={20} />
                <SkeletonLoader variant="text" width="40%" height={14} />
              </div>
            </div>
            <div className="mt-4">
              <SkeletonLoader variant="rounded" width="100%" height={80} />
            </div>
          </SkeletonGroupLoader>
        </div>
      );
    }
    

    Next steps

    • Ensure import "react-loadly/styles.css" is added to your root layout or _app.tsx.
    • Add data-skeleton to any other element in UserCard that should also become a skeleton block.
    • Pass the isLoading boolean from your data fetching hook (e.g., TanStack Query) to the ProfileCard.

    styles.css

    TSX · React component

    Generated

    Example file from a real run - the skill writes it into your workspace.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Managing loading states in React often requires writing redundant skeleton layouts or wrestling with inaccessible CSS spinners. This skill implements react-loadly to handle complex UI transitions, skeleton screens, and accessible loaders with minimal boilerplate.

    What it does

    • Skeletonize components by wrapping existing UI to transform text, images, and icons into skeleton blocks automatically.
    • Switch states using SkeletonSwitchLoader to manage loading, error, empty, and data-ready views in one place.
    • Implement spinners with 30+ accessible variants including SpinLoader, PulseLoader, and WaveLoader.
    • Orchestrate groups of skeletons using SkeletonGroupLoader to synchronize shimmer effects and stagger animations.
    • Accessible UI with built-in role="status", ARIA labels, and support for reduced-motion settings.

    How it works

    1. Analyze requirements for a component needing a loading state, such as a data table or profile card.
    2. Apply Skeletonize to wrap existing components with placeholder data to mirror the real UI layout.
    3. Configure loaders using specific variants like rectangular or circular for manual skeleton shells.
    4. Manage states by hooking into async data queries to toggle between loading, error, and content fallbacks.

    Frameworks & tools

    This skill works with React and Next.js (App and Pages Router). It utilizes the react-loadly library, TypeScript for type safety, and supports SSR environments.

    Why this beats prompting it yourself

    Writing skeletons manually usually leads to layout shift when the real data arrives. This skill ensures your skeleton matches your actual component 1:1 using Skeletonize and correctly configures ARIA attributes that LLMs often skip by default.

    Use cases

    • Generating a skeleton for a complex dashboard widget that mirrors the final UI layout exactly.
    • Implementing a unified loading, error, and empty state handler for a list of search results.
    • Creating an accessible, branded fullscreen spinner for initial app hydration or page transitions.

    Known limitations

    Does not handle progress bars for top-of-page route changes. In Next.js App Router, components must be used within "use client" files or passed as fallbacks to server components.

    Source and latest version: https://github.com/Mostafashadow1/agent-skills (MIT licensed, free). npm: https://www.npmjs.com/package/react-loadly · Docs: https://mostafashadow1.github.io/react-loadly/. Author: Mostafa Shadow.

    Not for route-change progress bars. Requires 'use client' directives in Next.js App Router. AutoSkeletonLoader is deprecated and avoided.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before any payment.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    3 uses

    Times used to date

    Free forever

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed 25 days ago

    • Free with an Agensi account

    Permissions

    Terminal / Shell
    Network Access
    Listed25 days ago

    What's inside

    Frequently Asked Questions

    This skill automates the creation of professional skeleton screens and accessible loaders using the react-loadly library, preventing layout shift and ensuring your UI remains screen-reader friendly without writing tedious CSS.

    The skill is fully compatible with React-based environments, including Next.js App and Pages routers, and provides full TypeScript support for type-safe loading states.

    Yes, the skill is designed to work with all major AI coding agents that support React development, helping you generate production-ready boilerplate for complex loading orchestrations.

    Unlike basic prompts, this skill uses the Skeletonize feature to mirror your actual UI 1:1 and automatically injects ARIA roles and reduced-motion support that manual coding often overlooks.

    You receive the specialized logic for implementing 30+ loader variants, skeleton synchronization patterns, and state management strategies for loading, error, and empty views.

    While it excels at component-level skeletons and spinners, it is not designed for top-of-page progress bars or native server-side skeleton rendering without a client-side wrapper.

    New in Frontend & Web Apps