API

Skeleton

Props, slots and events of the component.

Props

PropPurpose
ofthe result of useFetch, useAsyncData or useQuery: anything with data, status and error
data, loading, empty, errorset by hand, instead of or on top of of
samplesample data that draws the shape
idkey for the remembered shape; defaults to the page plus the order skeletons appear on it
labelread to screen readers while loading
persistwhether to remember the shape between visits; defaults to the module option
revealfade, sequence or sweep; defaults to the module option

Slots

SlotPropsShown for
default{ data }content and the skeleton
skeletonnoneinstead of the measured skeleton
emptynonean empty response
error{ error }an error

Events

reveal fires when content has replaced the skeleton.

SkeletonBox

One placeholder box in the same style as the measured bones.

PropDefault
width60%
height1em
radius--skeleton-radius

SkeletonSuspense

A Suspense boundary with a measured fallback. Takes the suspending component in the default slot, sample markup in #skeleton, and a label. It fires reveal when the component has resolved.