Guide

Debugging

See where a skeleton came from and whether the page moved.

A skeleton that doesn't match its content makes the page jump when the content arrives. The debug overlay finds those places. It outlines every skeleton in blue while it loads and says where its shape came from. When the content arrives, the outline turns green if nothing moved, or red with how many pixels it moved.

GET /posts/3loading

Turning it on

Add ?skeleton-debug to the URL, or turn it on for the whole app:

export default defineNuxtConfig({
  boneprint: { debug: true },
})

To outline one part of the page, put data-skeleton-debug on any element around it.

Where a shape comes from

LabelSource
memorythe shape remembered from an earlier load
datathe data already on screen, with :loading over it
sampleyour sample
slotthe slot as it is, without data or of
generic linesnothing to measure: pass a sample or an id

Seeing what was measured

Put data-skeleton-xray on any element around a skeleton. The hidden markup then shows through the bones in red, so you can check that the bars sit on the real lines.

<div data-skeleton-debug data-skeleton-xray>
  <Skeleton :of="post" :sample />
</div>

When the page moves

Most often the sample is shorter or longer than the real data, so give it text of typical length. If an image moves when it loads, it had no size to begin with: give it a width and height, or an aspect-ratio.