Skip to content
LoidoltTheme 0.11.1
Svelte 5

Component

Skeleton

A placeholder block for content still loading.

import { Skeleton } from '@loidolt/theme-svelte';

Example

Notes

  • variant takes the shape of what it replaces: text (with lines), title, avatar, button, card.

Props

Generated from the component source, so it cannot drift from the implementation.

Skeleton props
PropTypeDefaultNotes
class string—
height string | number—
lines number1For text: how many lines. The last one is shorter, as a paragraph's usually is.
ref bindableHTMLSpanElement | nullnull
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.