Skip to content
SkillCodex
Menu

Skeleton

Skeleton

Decorative placeholder shapes that reserve the approximate layout of content while that content is loading.

Try the component
Context, sources and actions
Sources and revision
Updated
Version
v1.0.26 · r2
Sources
5 sources
Status
Published
Read the sources

You may have searched for: gray shapes where cards will appearpreview the page layout while it loadsplaceholder lines before text arrives

All phrasings
Save and share

Recognize

Wait and track progress

Try it

Is duration unknown, measurable, or should the content shape be preserved?

Skeleton

Shared trial context

A workspace waits for content or an operation to finish and communicates only the progress it can measure honestly.

Skeleton

Mission

Skeleton

Compare all three placeholder geometries with the loaded profiles, simulate one failed card, and retry it.

Live result

Three decorative cards are loading; the real region is marked busy.

Step 1 of 3

Try

Try the component. Your live result appears just above. Move on at your own pace.

Behavior and edge case
What to observe
Three decorative placeholders approximate the profile-card grid while the directory exposes its busy state.
Edge case
A failed card becomes a real textual error with Retry rather than remaining an endless skeleton.

What this example shows

Skeleton previews content shape; Spinner communicates unknown work compactly, while Progress bar reports measurable completion.

Which fits your need?

Skeleton

Loading a card or article layout whose shape is known

Spinner

A short operation has no meaningful completion value

Which component will you use here?
Difference and sources

Skeleton previews content shape; Spinner communicates unknown work compactly, while Progress bar reports measurable completion.

Read the sources

    Parts of the specimen

    Select a numbered marker on the schematic, or use the list below, to see its role. The schematic shows the concept's representative state.

    Surface

    The visible container that holds the concept's content.

    Position in the atlas

    Relationship map

    Locate the chapter, neighboring concepts, and the next useful decision.

    • Chapter

      Wait and track progress

      Skeleton belongs to this comparison group.

    • Do not confuse

      Spinner

      Choose Skeleton if the loading region is large and its final shape is predictable, like a card or article. Choose Spinner if the wait is short or the region is small, such as inside a button.

      Compare this pair
    • Do not confuse

      Progress bar

      Choose Skeleton if a page region loads content whose layout is known in advance. Choose Progress bar if a task has a reliable completion value, such as an upload in bytes.

      Compare this pair
    • Next step

      Compare the concepts in the chapter before choosing an implementation.

      Open the chapter

    In your own words

    Understand

    What people describe

    Documented aliases: skeleton screen, content placeholder, loading placeholder

    • gray shapes where cards will appear
    • preview the page layout while it loads
    • placeholder lines before text arrives
    • reserve image and title space during loading
    • a loading state shaped like the final content
    • avoid the page jumping when data appears

    Choose

    Use it when

    • Loading a card or article layout whose shape is known
    • Preventing layout shift while a collection fetches

    Avoid it when

    • The wait concerns one compact button action
    • The final layout is unknown or highly variable

    Compare

    Compare similar concepts

    Verification checklist

    Try these actions in the lab, then check the same behaviours in your agent’s result. Adapt the example names to your interface.

    1. 1. Do this

      Start loading the example and use Tab while placeholders are visible.

      Expected result

      The loading area is identified, but decorative placeholders do not become keyboard stops.

    2. 2. Do this

      Let the real content appear and compare its layout with the reserved space.

      Expected result

      The content replaces the placeholders without an unnecessary layout jump or a change of keyboard focus.

    3. 3. Do this

      Simulate a failed card in the test example, choose Retry, then Show content.

      Expected result

      The failed card replaces its placeholder with an explanation and Retry; a successful retry restores real content.

    Full contract
    1. 1Placeholder geometry approximates final content
    2. 2Skeleton shapes are hidden from assistive technology
    3. 3The parent region exposes busy state
    4. 4Empty and error states replace an indefinite wait

    Understand → Recognize → Choose → Compare

    Pack for your agent

    Pre-written instructions to paste into your agent. Copying executes nothing.

    Implement correctly

    Build Skeleton without breaking its behavior

    # Implement Skeleton in your agent
    
    ## Objective
    Implement Skeleton for this verified behavior: Decorative placeholder shapes that reserve the approximate layout of content while that content is loading.
    
    ## Prerequisites
    - Inspect the repository, design system, and existing tests first.
    - Preserve unrelated changes and keep the file scope bounded.
    - Confirm that Skeleton matches the need before writing code.
    
    ## Required behavior
    - Placeholder shapes reserve stable space and are replaced by real content without a layout jump.
    - The content region exposes its busy state while a separate visual indicator remains redundant.
    
    ## States to cover
    - Placeholders visible
    - Content visible
    - Failed card error visible
    
    ## Accessibility
    - ARIA role: [aria-hidden=true] + [aria-busy=true]
    - The primary control or named region for Skeleton has a stable accessible name from visible text or an explicit programmatic label; placeholder text and tooltips are not names.
    - Focus remains on the existing page; replacing placeholders does not reorder or steal focus.
    - Skeletons disappear only when replaced by content, an empty state, or an actionable error state.
    - The region announces a concise loading state and final result; individual decorative shapes are never announced.
    - Placeholders never enter the tab order
    - Retry controls appear only in real error states
    
    ## When not to use
    - The wait concerns one compact button action
    - The final layout is unknown or highly variable
    
    ## Acceptance criteria
    - Placeholder geometry approximates final content
    - Skeleton shapes are hidden from assistive technology
    - The parent region exposes busy state
    - Empty and error states replace an indefinite wait
    
    ## Guardrails
    - Show the proposed changes before any external action.
    - Do not publish, send, delete, pay for, or change remote state without explicit authorization.
    - Preserve unrelated changes and stop if the scope becomes ambiguous.
    
    ## Output format
    - Outcome or verdict.
    - Files or actions involved.
    - Checks run and observable evidence.
    - Remaining blockers or limitations.
    
    • Web platform
    • Requires · Access to the repository, design system, and tests
    Why it works
    • The need is tied to canonical behavior before any technical choice.
    • States, accessibility, and non-goals prevent a merely visual implementation.
    • Acceptance criteria and the output format make verification observable.

    Try next

    Verify Skeleton on a real journey

    # Verify Skeleton after implementation
    
    ## Objective
    Audit the Skeleton implementation against its behavior, states, and accessibility requirements without changing it automatically.
    
    ## Checks
    - Replay the smallest representative journey.
    - Check keyboard behavior, focus, accessible name, and announcements.
    - Tie each gap to a specific acceptance criterion.
    
    ## Guardrails
    - Show the proposed changes before any external action.
    - Do not publish, send, delete, pay for, or change remote state without explicit authorization.
    - Preserve unrelated changes and stop if the scope becomes ambiguous.
    
    ## Output format
    - Outcome or verdict.
    - Files or actions involved.
    - Checks run and observable evidence.
    - Remaining blockers or limitations.
    

    sha256:79b04d3188656c3c622b4c23a0dfa99a27dee8dfe44b3e5d8223ea73be22b91e

    Diagnose a problem

    Find and fix the Skeleton defect

    # Debug Skeleton in your agent
    
    ## Observed symptom
    [DESCRIBE THE SYMPTOM HERE]
    
    ## Observable checks
    - Reproduce the issue with the smallest relevant journey.
    - Compare behavior with the documented states and transitions for Skeleton.
    - Verify keyboard behavior, focus, accessible name, and announcements.
    
    ## Possible causes
    - The chosen primitive does not match the expected behavior.
    - A state, transition, or focus return is missing.
    - A neighboring component captures an event or hides an accessible signal.
    
    ## Bounded corrections
    - Fix the reproduced cause without recreating neighboring components.
    - Preserve the public contract and add a focused regression test.
    - Do not install dependencies or change remote state without authorization.
    
    ## Final verification
    - Placeholder geometry approximates final content
    - Skeleton shapes are hidden from assistive technology
    - The parent region exposes busy state
    - Empty and error states replace an indefinite wait
    
    ## Guardrails
    - Show the proposed changes before any external action.
    - Do not publish, send, delete, pay for, or change remote state without explicit authorization.
    - Preserve unrelated changes and stop if the scope becomes ambiguous.
    
    ## Output format
    - Outcome or verdict.
    - Files or actions involved.
    - Checks run and observable evidence.
    - Remaining blockers or limitations.
    
    • Web platform
    • Requires · Access to the repository, design system, and tests
    Why it works
    • The explicit symptom prevents starting from an assumed fix.
    • Checks separate behavior, accessibility, and neighboring interference.
    • The fix stays bounded and must produce regression evidence.

    Try next

    Lock in the Skeleton fix

    # Prevent the Skeleton regression
    
    ## Objective
    Turn the reproduced cause into a focused regression test and compare Skeleton with neighboring concepts before widening the fix.
    
    ## Checks
    - Prove that the test fails before the fix.
    - Prove that it passes after the bounded fix.
    - Verify that no neighboring component changed behavior.
    
    ## Guardrails
    - Show the proposed changes before any external action.
    - Do not publish, send, delete, pay for, or change remote state without explicit authorization.
    - Preserve unrelated changes and stop if the scope becomes ambiguous.
    
    ## Output format
    - Outcome or verdict.
    - Files or actions involved.
    - Checks run and observable evidence.
    - Remaining blockers or limitations.
    

    sha256:b23581299234e05a3aee496231a9722b2079660a6a87e6aba14f832d681ea10a

    Full entry, saving and provenance

    Pre-written instruction by SkillCodex — your request is neither sent nor used to adapt this text; no content is generated, and copying executes nothing.

    Pack digest: sha256:c1af1cfa58ea707f717166eba2f33eb0e569db2bfa145cee0b94302c19c05c8b

    In code

    TechnologyPrimitiveVersionCaveat
    Web platform

    decorative blocks

    NativeSkeleton shapes are decorative layout placeholders. aria-busy belongs on the updating region, with status text when users need it.

    Technical details

    Behaviors

    • Reserve the final layout

      Placeholder shapes reserve stable space and are replaced by real content without a layout jump.

    • Mark the region busy

      The content region exposes its busy state while a separate visual indicator remains redundant.

    States

    • Placeholders visible

      Placeholders visible

    • Content visible

      Content visible

    • Failed card error visible

      Failed card error visible

    State transitions

    • Placeholders visible → Content visible

      The requested content resolves and atomically replaces matching placeholder geometry.

    • Content visible → Failed card error visible

      Simulate failed card keeps two profiles visible and replaces the third with a textual error and Retry.

    • Placeholders visible → Failed card error visible

      Simulate failed card replaces the loading example with two profiles and one recoverable card error.

    • Failed card error visible → Placeholders visible

      Retry card restores the three matching placeholders while the replacement content loads again.

    • Failed card error visible → Content visible

      Show content replaces the recoverable card error with all three loaded profiles.

    Test scenarios

    Context
    A people directory loads three profile cards with an avatar, name, and short status.
    Mission
    Compare all three placeholder geometries with the loaded profiles, simulate one failed card, and retry it.
    Primary state
    Three decorative placeholders approximate the profile-card grid while the directory exposes its busy state.
    Edge case
    A failed card becomes a real textual error with Retry rather than remaining an endless skeleton.

    Visual signals

    • Muted blocks matching final content proportions
    • No readable fake content
    • Stable dimensions before and after replacement

    Behavioral signals

    • Placeholder is hidden from assistive technology
    • Parent content region is busy
    • The busy state remains on the parent until replacement is complete

    Accessibility

    Role
    [aria-hidden=true] + [aria-busy=true]
    Accessible name
    The primary control or named region for Skeleton has a stable accessible name from visible text or an explicit programmatic label; placeholder text and tooltips are not names.
    Focus
    Focus remains on the existing page; replacing placeholders does not reorder or steal focus.
    Dismissal
    Skeletons disappear only when replaced by content, an empty state, or an actionable error state.
    Scroll
    Loading and replacement content reserve enough space to prevent layout jumps and preserve the user's scroll position.
    Announcement
    The region announces a concise loading state and final result; individual decorative shapes are never announced.
    Keyboard
    • Placeholders never enter the tab order
    • Retry controls appear only in real error states

    Bindings

    Open the HTML, ARIA, Radix, and shadcn matrix
    • decorative blocks

      implementationKind
      custom
      nativeElement
      decorative blocks
      ariaPattern
      aria-busy on the content region
      radixPrimitive
      Not applicable
      shadcnRecipe
      Not applicable
      runtimeDependency
      Not applicable
      packageName
      Not applicable
      exportName
      Not applicable
      exactVersion
      Not applicable
      status
      exception
      sourceId
      source-ui-wai-aria-busy
      deprecationStatus
      active
      replacement
      Not applicable
      validFrom
      Not applicable
      validUntil
      Not applicable

      Equivalence caveat: Skeleton shapes are decorative layout placeholders. aria-busy belongs on the updating region, with status text when users need it.

      Verify binding source

    Sources

    • shadcn/ui: Skeleton
      sourceId
      source-ui-shadcn-skeleton
      kind
      documentation
      canonicalUrl
      https://ui.shadcn.com/docs/components/radix/skeleton
      publisher
      shadcn/ui
      sourceRevision
      http-etag:W/"10rf6hvbiwtf4zv"
      consultedAt
      2026-07-19
      license
      Not stated
      contentDigest
      sha256:2093318e2a546a69ce8dde969099676cd25b5e74e0a089cb6fc6162f261924f0
      status
      verified

      Claim covered: Skeleton: documented parts, state APIs, interaction behavior, and implementation limits for shadcn Skeleton.

    • WAI-ARIA 1.2: aria-busy
      sourceId
      source-ui-wai-aria-busy
      kind
      standard
      canonicalUrl
      https://www.w3.org/TR/wai-aria-1.2/#aria-busy
      publisher
      W3C WAI
      sourceRevision
      W3C-REC-wai-aria-1.2-20230606
      consultedAt
      2026-07-19
      license
      Not stated
      contentDigest
      sha256:c0fea16fc747779569ab754d2d25bca3e2b7e8a673b8ef5362aeb9ebc73a4849
      status
      verified

      Claim covered: Skeleton: the normative aria-busy state for exposing a region while its content is updating.

    • WCAG 2.2: Status Messages
      sourceId
      source-ui-wcag-understanding-status-messages
      kind
      documentation
      canonicalUrl
      https://www.w3.org/WAI/WCAG22/Understanding/status-messages.html
      publisher
      W3C WAI
      sourceRevision
      http-last-modified:2026-07-02T10:07:49Z
      consultedAt
      2026-07-19
      license
      Not stated
      contentDigest
      sha256:cf2a8c16b20c1a94164c9a37e2b3f15d9a7d3f47d88385d47432d6a29655609e
      status
      verified

      Claim covered: Skeleton: informative WCAG guidance for status messages announced without moving focus.

    • WAI-ARIA 1.2: Live Region Attributes
      sourceId
      source-ui-wai-aria-live-regions
      kind
      standard
      canonicalUrl
      https://www.w3.org/TR/wai-aria-1.2/#attrs_liveregions
      publisher
      W3C WAI
      sourceRevision
      W3C-REC-wai-aria-1.2-20230606
      consultedAt
      2026-07-19
      license
      Not stated
      contentDigest
      sha256:c0fea16fc747779569ab754d2d25bca3e2b7e8a673b8ef5362aeb9ebc73a4849
      status
      verified

      Claim covered: Skeleton: normative live-region properties for status announcement behavior.

    • WAI-ARIA 1.2: Roles Model
      sourceId
      source-ui-wai-aria-roles
      kind
      standard
      canonicalUrl
      https://www.w3.org/TR/wai-aria-1.2/#roles
      publisher
      W3C WAI
      sourceRevision
      W3C-REC-wai-aria-1.2-20230606
      consultedAt
      2026-07-19
      license
      Not stated
      contentDigest
      sha256:c0fea16fc747779569ab754d2d25bca3e2b7e8a673b8ef5362aeb9ebc73a4849
      status
      verified

      Claim covered: Skeleton: normative ARIA role definitions and constraints for the stated accessible role.