Installation
Barrel
import { SkeletonLine } from 'kumo-svelte'; Granular
import { SkeletonLine } from 'kumo-svelte/components/loader';Custom Widths
Control the randomized width range for more natural-looking skeletons.
Custom Height
Override the default height using Tailwind utility classes via class. The default height is 0.5rem.
Block Height
Use blockHeight to set the height of a container that
vertically centers the skeleton line. Useful when replacing text of a known
line height. Accepts a number (treated as px) or any CSS string
value.
Card Loading State
Use skeleton lines to create loading states for cards and content areas.
API Reference
| Prop | Type | Default |
|---|---|---|
| minWidth | number | 30 |
| maxWidth | number | 100 |
| minDuration | number | 1.3 |
| maxDuration | number | 1.7 |
| minDelay | number | 0 |
| maxDelay | number | 0.5 |
| blockHeight | string | number | - |
| class | string | - |