Loading...
Loading...
Use boneyard-js to add, configure, debug, or rebuild skeleton screens. Triggers when working with Skeleton components, bones JSON, the boneyard CLI, fixtures, leafTags, snapshotConfig, skeleton loading states, or boneyard.config.json.
npx skill4agent add 0xgf/boneyard boneyardboneyard-jspackages/boneyard/src/react.tsx<Skeleton>configureBoneyardregisterBonessrc/preact.tsxsrc/Skeleton.sveltesrc/Skeleton.vuesrc/angular.tssrc/native.tsxsrc/react-native.tsxsrc/extract.tssnapshotBones()fromElement()src/shared.tsSHIMMERPULSEDEFAULTSresolveResponsivesrc/types.tsSnapshotConfigBoneCompactBoneResponsiveBonessrc/runtime.tsrenderBones()bin/cli.jsboneyard-js buildboneyard-jsboneyard-js/reactboneyard-js/preactboneyard-js/nativeboneyard-js/svelteboneyard-js/vueboneyard-js/angularboneyard-js/vite[x%, y_px, w%, h_px, borderRadius, isContainer?]xwyhborderRadiusisContainerinitialBonesnameregistry.jswindow.__BONEYARD_BUILD === trueshared.tsshared.tsSHIMMER = { angle: 110, start: 30, end: 70, speed: '2s', lightHighlight: '#f7f7f7', darkHighlight: '#2c2c2c' }
PULSE = { speed: '1.8s', lightAdjust: 0.3, darkAdjust: 0.02 }
DEFAULTS = { web: { light: '#f0f0f0', dark: '#222222' }, native: { light: '#f0f0f0', dark: '#222222' } }.dark<html>prefers-color-scheme.darkdarkColordarkShimmerColor{
leafTags?: string[] // Tags treated as atomic bones (merged with defaults: p,h1-h6,li,td,th)
captureRoundedBorders?: boolean // Capture bordered+rounded elements even without bg (default: true)
excludeTags?: string[] // Skip these tags entirely
excludeSelectors?: string[] // Skip elements matching CSS selectors
}boneyard.config.jsonregistry.jsconfigureBoneyard(){
"breakpoints": [375, 768, 1280],
"out": "./src/bones",
"wait": 800,
"color": "#e5e5e5",
"darkColor": "#2a2a2a",
"animate": "shimmer",
"shimmerColor": "#ebebeb",
"darkShimmerColor": "#333333",
"speed": "2s",
"shimmerAngle": 110,
"stagger": false,
"transition": false,
"boneClass": "",
"resolveEnvVars": true,
"auth": {
"cookies": [{ "name": "session", "value": "env[SESSION_TOKEN]", "domain": "localhost" }],
"headers": { "Authorization": "Bearer env[API_TOKEN]" }
}
}| Key | Default | Description |
|---|---|---|
| breakpoints | [375, 768, 1280] | Viewport widths captured by CLI (auto-detects Tailwind) |
| out | ./src/bones | Output directory |
| wait | 800 | ms to wait after page load before capturing |
| Key | Default | Description |
|---|---|---|
| color | #f0f0f0 | Bone fill color (light mode) |
| darkColor | #222222 | Bone fill color (dark mode, |
| animate | "pulse" | Animation: "pulse", "shimmer", or "solid" |
| shimmerColor | #f7f7f7 | Shimmer highlight color (light mode) |
| darkShimmerColor | #2c2c2c | Shimmer highlight color (dark mode) |
| speed | "2s" (shimmer) / "1.8s" (pulse) | Animation duration |
| shimmerAngle | 110 | Shimmer gradient angle in degrees |
| stagger | false | Delay between bones in ms (true = 80ms) |
| transition | false | Fade transition when loading ends in ms (true = 300ms) |
| boneClass | — | CSS class applied to each bone element |
configureBoneyard()shared.tsimport { Skeleton } from 'boneyard-js/react'
<Skeleton name="my-component" loading={isLoading}>
<MyComponent data={data} />
</Skeleton><Skeleton
name="my-component"
loading={isLoading}
fixture={<MyFixture />}
snapshotConfig={{ leafTags: ["section"] }}
>
<MyComponent data={data} />
</Skeleton><section>leafTags<nav data-no-skeleton>
{/* No bone will be generated */}
</nav>snapshotConfig<Skeleton snapshotConfig={{ excludeSelectors: ['.icon', 'svg'], excludeTags: ['nav'] }}># Auto-detect dev server
npx boneyard-js build
# Explicit URL + output
npx boneyard-js build http://localhost:PORT --out src/bones
# Force rebuild all (skip hash check)
npx boneyard-js build --force
# Watch mode (re-capture on HMR)
npx boneyard-js build --watch
# Custom breakpoints
npx boneyard-js build --breakpoints 375,640,768,1024,1280,1536
# React Native mode
npx boneyard-js build --native --out ./bones| Prop | Type | Default | Description |
|---|---|---|---|
| | required | Show skeleton vs children |
| | required | Real content |
| | required | Registry key + CLI identifier |
| | — | Pre-generated bones (overrides registry) |
| | #f0f0f0 | Bone fill color (light mode) — any CSS color (hex, rgba, hsl, etc.) |
| | #222222 | Dark mode bone fill color ( |
| | | "pulse", "shimmer", "solid" (also accepts boolean) |
| | | Stagger delay (true=80ms) |
| | | Fade-out duration (true=300ms) |
| | — | CSS class per bone |
| | — | Container class |
| | — | Shown when loading + no bones |
| | — | Mock content for CLI capture |
| | — | Controls bone extraction |
registry.jsleafTagssnapshotConfig--force<=.dark<html>prefers-color-schemeloading={false}c: trueshimmerColorcolor#f7f7f7#f0f0f0