Skeleton
Reserve the layout of content that is still loading. Match the final width, height, and shape.
Width
1
<Skeleton :width="160" />
Box height
box-height sets the block size. height is the fallback when box-height is omitted.
1
<Skeleton :width="160" :box-height="42" />
Wrapping children
Wrap the real control to inherit its size. show (default true) paints the shimmer; show false reveals the child.
Fixed size
Lock width and height so the swap does not reflow neighbors when children resolve.
Shapes
pill for avatars, default rounded for buttons and chips, squared for image tiles. rounded is accepted and matches the default 6px corner.
No animation
1
<Skeleton :animated="false" width="100%" :height="100" />
Button
button grows the shimmer by 1px so it covers the control's border.
Best practices
- Skeleton is for async data that fills a known layout: rows, cards, a profile block. A single in-flight action uses Spinner or Button
loading. Known progress uses Progress. No data at all uses Empty State. - Set
widthandheight/box-heightto the resolved content. A 200×20 block becoming an 80×16 string reads as a glitch. - Pick
pill, default rounded, orsquaredto mirror the element that will appear. - When wrapping children, keep those dimensions stable and toggle
show. Do not mount a different box on reveal. - Mark the loading region
aria-busy="true". Announce completion on the destination witharia-live="polite", not on the skeleton. The skeleton itself is decorative. - Turn animation off on low-power surfaces and respect
prefers-reduced-motion. Do not leave focusable controls inside a visible skeleton.