Ghost Gobbler Skull
A glossy vinyl-toy skull that tracks little black-smoke ghosts drifting in from every direction, drops its jaw, slurps each one in like spaghetti and CHOMPS — then levels up: glowing eyes, blush, cracks of light, star catchlights, orbiting embers, flames and finally a crown with a smoke-ring burp. Works as a determinate or endless loader, an async task wrapper with a sad dizzy failure, or an idle mascot.
Try it: Watch it eat 8 ghosts to the finale. Move your pointer — the eyes follow; hover for a cheeky grin; click or press Enter to chomp.
Installation
Install with the shadcn CLI:
npx shadcn@latest add https://www.framekitui.live/r/ghost-gobbler-skull.jsonOr, with the @framekit namespace registered: npx shadcn@latest add @framekit/ghost-gobbler-skull. You can also copy the source into components/ui/ghost-gobbler-skull.tsx (view on GitHub).
Usage
import { GhostGobblerSkull } from '@/components/ui/ghost-gobbler-skull'Props
| Prop | Type | Default | Notes |
|---|---|---|---|
mode | 'determinate' | 'indeterminate' | 'idle' | 'determinate' | Eat `total` ghosts then finale, loop forever (levels cycle), or mascot-only idle life. |
progress | number | — | 0–1. Allows round(progress × total) ghosts to be eaten; omit in determinate mode to autoplay to the finale. A lurking ghost circles while it waits. |
total | number | 8 | Ghosts in a full run (the 8 transformation levels are spread across them). |
size / spread | number | 200 / 1.9 | Skull width in px and the stage size relative to it (room for ghosts to fly in). |
ghostColor | string | '#16121c' | Smoke colour (#rrggbb). On dark pages the smoke gets a faint moonlit halo. |
glowPalette | string[] | DEFAULT_GHOST_GLOW | Eight eye-glow colours, one per level. |
speed | number | 1 | Flight / suction speed multiplier. |
interactive | boolean | true | Focusable; eyes follow the pointer, hover = cheeky grin, click / Enter / Space = chomp. |
task | () => Promise<unknown> | — | Eats endlessly while pending; resolve → finale, reject → sad dizzy skull, ghosts escape, Retry re-runs the task. |
onComplete / onError | () => void / (error) => void | — | Finale reached / task rejected. |
label / showLabel | string / boolean | 'Loading' / true | Accessible name + aria-live status (“Loading, 3 of 8”) and the visible caption row with progress dots. |
replayable / resetKey | boolean / Key | true | Replay button after the finale; change resetKey to restart from zero. |
Dependencies
motionlucide-react
Related Loading components
- Particle Morph Loader
A depth-lit swarm of motes spins in 3D and melts between sphere, ribbon, shell, tetra, ring and helix while a status word rolls underneath.
- Liquid Charge Capsule
A glass capsule with a two-layer sloshing liquid that rises to the charge level. Colour warms from ember red to calm emerald as it fills, bubbles rise and pop while charging, a brushed-metal bolt…
- Lattice Pulse Loader
3×3 nodes pulse in a traveling wave.
- Morph Glyph Loader
Glyph morphs through abstract SVG shapes.
- Snake Loader
A progress loader whose visual is a tiny snake board. The snake plays itself while you wait, progress fills a row of tiles beneath it, and the status line carries the label, current step and…
- Ink Drip Loader
Ink drops merge into a looping puddle.