HubLensReact0xGF/boneyard
// archived 2026-04-06
0xGF

boneyard

Frontend#React#Svelte#Skeleton Loading#UI Components#Web Development
View on GitHub
218

// summary

Boneyard is a development tool that extracts layout information from the real DOM to automatically generate pixel-perfect skeleton screens. Developers can achieve loading placeholder effects without manual adjustments through simple component wrapping and command-line builds. The tool supports various frameworks such as React, React Native, and Svelte, and provides a flexible layout API to meet different responsive requirements.

// technical analysis

Boneyard adopts a design philosophy of automated skeleton screen generation, eliminating the tedious work of manual measurement and placeholder adjustment by extracting layout information directly from the real DOM. This project addresses the pain point in traditional skeleton screen development where it is difficult to maintain high consistency with UI layouts, using a CLI tool to automatically capture element positions and generate precise skeleton data. Its technical decisions emphasize responsive support and performance optimization, allowing developers to efficiently reuse skeleton descriptors in SSR or high-frequency repaint scenarios by providing a compiled layout API, achieving a balance between development efficiency and runtime performance.

// key highlights

01
Generates skeleton screens pixel-aligned with the actual UI by automatically scanning the real DOM structure, eliminating the need to manually write placeholders.
02
Built-in responsive support, capable of automatically capturing layout information across multiple preset breakpoints (e.g., 375px, 768px, 1280px).
03
Provides a framework-agnostic skeleton registration mechanism, supporting various development environments such as React, Svelte, and React Native.
04
Features an intelligent layout engine that optimizes repetitive rendering performance via the compileDescriptor API, suitable for SSR and complex animation scenarios.
05
Supports custom skeleton colors and pulse animation effects, enhancing the visual experience during loading.
06
The CLI tool supports flexible configuration, allowing developers to specify URLs or custom breakpoints to generate skeleton data.

// use cases

01
Automatically scan and generate skeleton screens that perfectly match real component layouts via the command line
02
Support multi-breakpoint responsive skeleton screens to ensure consistent display across different screen sizes
03
Provide high-performance layout compilation APIs suitable for SSR and high-frequency repaint scenarios

// getting started

First, install the dependency via npm install boneyard-js, wrap your components with the <Skeleton> tag, and specify a unique name. Next, run the npx boneyard-js build command to automatically scan the DOM and generate skeleton data. Finally, import the generated registry file at your application entry point to implement the automated skeleton screen loading effect.