Skeleton @astryx-svelte/core v0.3.0 · Skeleton

Usage

An animated shimmer placeholder that previews the shape of content while it loads. Use it to build loading screens that match the layout of the real content. For content with unknown dimensions, use Spinner instead.
ts
import { Skeleton } from '@astryx-svelte/core';

Best practices

GuidancePractices
DoMatch the size and shape of the content being loaded to create a realistic placeholder.
DoStagger multiple skeletons with the index prop for a natural wave animation.
Don'tUse when the content dimensions are unknown; use Spinner instead.
Don'tCombine with a Spinner on the same content area; pick one loading pattern.
Don'tShow skeletons indefinitely; if loading takes too long, show an error or empty state instead.

Examples

Common configurations, variations, and states.
Skeleton — Card Loading
Card skeleton with avatar, name, and content lines.
Skeleton — Staggered List
Staggered skeleton lines with varying widths.
Skeleton — Table Rows
Table skeleton with staggered column widths.