Skip to main content

Skeleton Text

Multi-line text skeleton for paragraph placeholders

Skeleton Text

Multi-line text skeleton component for creating realistic paragraph and text block placeholders with natural line width variation.

Demo

Default (3 lines)
Loading...
Loading...
Loading...
Custom Widths
Loading...
Loading...
Loading...
Loading...

Usage

<script>
import SkeletonText from '$lib/shared/components/loading/SkeletonText.svelte';
</script>

<!-- Default 3 lines -->
<SkeletonText />

<!-- Custom line widths -->
<SkeletonText
	lines={4}
	lineWidths={['100%', '90%', '95%', '70%']}
/>

Props

PropTypeDefaultDescription
linesnumber3Number of text lines
lineWidthsstring[]Auto-generatedCustom width for each line
lastLineWidthstring'70%'Width of the last line
animation'shimmer' \| 'pulse' \| 'none''shimmer'Animation style
gapstring'var(--space-3)'Gap between lines
classstring''Additional CSS classes