Component
Skeleton
A placeholder block for content still loading.
import { Skeleton } from '@loidolt/theme-svelte';
Example
Notes
varianttakes the shape of what it replaces:text(withlines),title,avatar,button,card.
Props
Generated from the component source, so it cannot drift from the implementation.
| Prop | Type | Default | Notes |
|---|---|---|---|
class | string | — | |
height | string | number | — | |
lines | number | 1 | For text: how many lines. The last one is shorter, as a paragraph's usually is. |
ref bindable | HTMLSpanElement | null | null | |
variant | 'block' | 'text' | 'title' | 'avatar' | 'button' | 'card' | 'block' | The shape standing in for content. block (the default) is sized by width and height; the others take the metrics of what they replace — a line of body text, a heading, an avatar, a button, a card. |
width | string | number | — | Number is treated as pixels; strings pass through as CSS. |
Plus the attributes of HTMLAttributes<HTMLSpanElement>, forwarded to the root element.