Skip to content

Animation & Motion

Skeleton States

Free

Build skeletons that match the loaded layout so content does not jump.

Difficulty foundational
Version v1.1

Purpose

Replace spinners and gray boxes that are a different shape than the data.

Procedure

--- name: skeleton-states description: Build skeletons that match the loaded layout so content does not jump. ---

Skeleton States

Purpose

Replace spinners and gray boxes that are a different shape than the data.

Procedure

A skeleton is a quiet stand-in for a region whose size you know. Match the loaded layout: same grid, same number of lines, same media box. If you do not know the height, reserve a minimum that is close, not a giant rectangle.

Color: a single silver surface, slightly darker than the page. No gradients that travel across the whole screen. A subtle pulse is allowed and must stop under prefers-reduced-motion.

Do not skeleton text you already have (the page title, the user's name). Do not skeleton for under 150ms; a delay avoids a flash on fast responses. Implement the delay so a resolved request never shows the skeleton.

Skeletons are aria-hidden and the region has a visually hidden "Loading" label.

Do not use a skeleton for an error. Switch to the error state.

Do not invent gray boxes for images you could have omitted. If there is no image in the loaded state, there is no image skeleton.

Example requests

1. Card skeleton

Request: Add a skeleton for the skill card grid using Skeleton States. Expected: Same grid, same card height, no layout shift when data arrives.

Dependencies

None. Work in the repository that is already open. Do not add packages unless the procedure names one.

Compatibility

This document follows the Agent Skills layout (a folder named skeleton-states containing SKILL.md). Claude Code, Cursor, Codex, and Gemini CLI can load that file from the paths in the Skilling installation guide. GitHub Copilot does not load SKILL.md. Use the Copilot instructions copy, and narrow applyTo before you commit it.

Example prompts

Card skeleton

Add a skeleton for the skill card grid using Skeleton States.

Expected: Same grid, same card height, no layout shift when data arrives.

Choose the agent

This skill is installed for one agent at a time. Pick the section you are using.

Related

  • Empty, Loading, Error

    Specify the three non-happy states for any list or detail view so the UI never goes blank.

  • Motion Rules

    Add motion only to explain a change: 150–250ms, ease-out, and a reduced-motion path.

  • Data Tables

    Present repeated records as a real table on wide screens and a list on narrow ones, with sort and empty state.

Reviews

No reviews yet.

    Sign in to review.

    Report a problem

    Inaccurate steps, an unsafe instruction, or a licensing concern.

    Sign in to report.