Introduction
Zero-config skeleton loaders for React. Wrap your component, done.
Ghostly transforms your existing components into skeleton loaders using pure CSS. No CLI, no build step, no code changes.
import { Ghostly } from '@ghostly/react'
import 'ghostly/css'
<Ghostly loading={isLoading}>
<ProductCard product={data} />
</Ghostly>Your component is the skeleton. Ghostly uses CSS to hide text and images, replacing them with animated placeholder blocks — preserving the exact same layout.
Why Ghostly?
Most skeleton libraries require you to rewrite your components, run CLI tools, or maintain generated files. Ghostly doesn't.
| Traditional | Ghostly | |
|---|---|---|
| Setup | CLI + config + build | npm install + CSS import |
| Code changes | Rewrite components | None |
| Maintenance | Regenerate on changes | Zero |
| Bundle size | 4-16KB + runtime JS | ~3KB, zero runtime JS |
| Suspense | Manual wiring | <GhostlySuspense> built-in |
Quick Start
Installation
Install Ghostly in under 30 seconds
Basic Usage
Learn the basics of wrapping components
API Reference
Full component, hook, and prop reference
Examples
Real-world patterns and integrations
Features
- Zero config — Install, import CSS, wrap. No CLI, no build step, no config files
- Zero code changes — Your components stay exactly as they are
- CSS-first — All skeleton logic is pure CSS. Zero JavaScript overhead at runtime
- GhostlySuspense — Automatic skeleton with React Suspense. No loading state needed
- Smooth transitions — Fade-out when loading ends with the
smoothprop - Color props — Customize colors per-instance with
colorandshineprops - Line control —
data-ghostly-linesfor text,data-ghostly-ratiofor images - Tailwind plugin — Utility classes:
ghostly-radius-*,ghostly-speed-*,ghostly:variant - Progressive — Works with CSR, SSR, RSC, and Suspense
- Accessible — ARIA attributes, reduced motion, screen reader friendly
- Tiny — ~2KB CSS + ~1KB React (gzipped). Zero runtime dependencies in core
Packages
| Package | Description | Size (gzip) |
|---|---|---|
ghostly | CSS engine + types + Tailwind plugin | ~2KB |
@ghostly/react | React components | ~1KB |