Getting Started
Nuxt module
Add Boneprint to a Nuxt 3 or Nuxt 4 app.
Install
npm install boneprint
pnpm add boneprint
yarn add boneprint
bun add boneprint
Then add the module:
nuxt.config.ts
export default defineNuxtConfig({
modules: ['boneprint/nuxt'],
})
That's all. <Skeleton>, <SkeletonBox>, <SkeletonSuspense>, forgetSkeletons() and useInSkeleton() are auto-imported, and the styles are added for you. Works with Nuxt 3 and Nuxt 4.
Options
nuxt.config.ts
export default defineNuxtConfig({
modules: ['boneprint/nuxt'],
boneprint: {
reveal: 'sequence',
},
})
Every option is listed on the Options page.
What you get with server rendering
The server sends the skeleton in the HTML, and a small inline script draws a remembered shape before the app loads. So even before JavaScript runs, blocks are the size the content will be. Next: Quick Start.