Boneyard Rethinks Skeleton Screens: From Hand‑Written UI to Compile‑Time Assets

The article introduces Boneyard, a tool that automatically generates skeleton screen data from real UI during the build step, eliminating the need to hand‑write placeholder components, and explains its workflow, CLI usage, supported frameworks, and how it turns loading states into compile‑time artifacts.

Full-Stack Cultivation Path
Full-Stack Cultivation Path
Full-Stack Cultivation Path
Boneyard Rethinks Skeleton Screens: From Hand‑Written UI to Compile‑Time Assets

In the frontend world, almost everyone has written a skeleton screen at some point.

Typical approaches are either using component libraries such as Ant Design to assemble a skeleton, or hand‑coding a set of skeleton components. These methods suffer from excessive code, synchronization issues when the UI changes, and high effort for complex layouts.

Boneyard: Ditch Hand‑Written Skeletons

A recent project called Boneyard does something counter‑intuitive: it stops developers from writing Skeleton components manually and instead generates them directly from the real page.

How It Works

During the build phase Boneyard “flattens” the actual UI into skeleton data.

Core Workflow (Critical)

The process is straightforward:

Write Your Component Normally

You write the UI component as usual without any skeleton code:

<Skeleton name="user-card">
  <UserCard />
</Skeleton>

Run the CLI to Generate Skeleton

npx boneyard-js build

This step launches a Playwright browser, scans the DOM, and records the position and size of every element. The result is a .bones.json file containing coordinates (x, y, width, height, radius).

UI → Coordinate data (x / y / width / height / radius)

Render at Runtime

<Skeleton name="user-card" />

At runtime the component no longer depends on the original UI; it renders the stored skeleton data directly.

Quick Start

Only three steps are needed:

Install

npm install boneyard-js

Wrap Your Component

<Skeleton name="card">
  <Card />
</Skeleton>

Generate Skeleton

npx boneyard-js build

After the build you can use the generated skeleton immediately.

Supported Frameworks

Boneyard is framework‑agnostic. Officially it supports React, React Native, and Svelte 5. A community version boneyard-vue adapts it for Vue.

Vue Example

<Skeleton name="card" :loading="loading">
  <Card />
</Skeleton>

Conclusion

Boneyard turns skeleton screens from a manual chore into a compile‑time artifact, moving UI loading states into the era of compilation.

Related Links

Boneyard website: https://boneyard.vercel.app/overview Boneyard Vue repository:

https://github.com/samuelbelo/boneyard-vue
Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

FrontendCLIReactVueBoneyardSkeleton Screens
Full-Stack Cultivation Path
Written by

Full-Stack Cultivation Path

Focused on sharing practical tech content about TypeScript, Vue 3, front-end architecture, and source code analysis.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.