skeleton-loaders

Standardize skeleton loading states with shimmer classes and ARIA attributes.

21|4|Updated Sep 4, 2024
One-click install
npx skills add https://github.com/gaia-react/gaia --skill skeleton-loaders
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: skeleton-loaders
Source: https://github.com/gaia-react/gaia/tree/main/.claude/skills/skeleton-loaders
Command: npx skills add https://github.com/gaia-react/gaia --skill skeleton-loaders

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill solves the issue of layout shift and poor user experience during data fetching by providing a standardized, performant way to implement skeleton loading states that match the dimensions of the final content.

Core Features & Use Cases

  • Transparent Text Technique: Uses real HTML elements with shared shimmer classes to ensure skeleton dimensions perfectly match the rendered content.
  • 200ms Delay Pattern: Prevents visual flickering by delaying the skeleton appearance during fast network requests.
  • Accessibility Guardrails: Provides instructions for using aria-hidden and role status to ensure screen readers handle loading states gracefully.

Quick Start

Generate a skeleton loader component for the user profile section using the shimmer class and the 200ms delay pattern.

Frequently Asked Questions about skeleton-loaders

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prevent layout shift in React when fetching asynchronous data?

To prevent layout shift during asynchronous data fetching, implement skeleton loading states that match the exact dimensions of your final rendered content using shared component font classes and shimmer animations.

What is the best way to make skeleton loaders match real content dimensions in React?

The best way to match real content dimensions is the transparent text technique, which uses actual HTML elements with shared shimmer classes to ensure the skeleton placeholder perfectly aligns with the final rendered content.

How do I stop skeleton loaders from flickering during fast network requests?

To stop skeleton loaders from flickering during fast network requests, apply a 200ms delay pattern that delays the skeleton appearance, preventing visual flashing when data loads quickly.

How should I handle screen reader accessibility for shimmer loading states?

Handle screen reader accessibility for shimmer loading states by using proper ARIA attribute management, specifically applying aria-hidden to hide visual placeholders and role status to announce loading completion gracefully.

Do I need external dependencies to create shimmer animations for UI placeholders?

You do not need external dependencies to create shimmer animations, as the implementation leverages existing component font classes and timing-based rendering logic to generate pixel-perfect UI placeholders.

When should I use a skeleton loader instead of a standard spinner in UX design?

Use a skeleton loader instead of a standard spinner when fetching asynchronous data for content-heavy UI sections, as skeletons prevent layout shift and provide a better user experience by mirroring final content structure.