GPUI Deck

Skeleton

Static decorative placeholder with application-controlled size and shape.

Rendered by GPUI’s web backend from the real component. Requires a browser with WebGPU.

skeleton.rs is a static decorative placeholder. The application supplies its dimensions and decides when to replace it with ready content:

Skeleton::new("preview-placeholder", palette)
    .w(px(180.))
    .h(px(16.))
    .rounded(px(4.))

The default is a full-width line as high as the consumer's font size, using its border color, corner radius, and 0.35 opacity. Ordinary Styled refinements can make text lines, blocks, or circular placeholders. The surface owns no timer or animation, so it remains still under every motion preference.

Skeleton adds no native role, accessible name, children, or focus stop. Name the loading operation separately, as the example does with Spinner. It owns no loading state or content measurement; a collection of placeholders is ordinary application layout. The example shows one where the percentage fill is not yet available and removes it when known progress is restored.