Cook Loading
An illustrated chef stirs a sizzling wok while your app loads — eight original cooking poses, drifting steam, real progress and ready/error states in one self-contained component.
Try it: Watch the chef cook; pause the animation, try Ready/Error, or enable real progress in the demo.
Installation
Install with the shadcn CLI:
npx shadcn@latest add https://www.framekitui.live/r/cook-loading.jsonOr, with the @framekit namespace registered: npx shadcn@latest add @framekit/cook-loading. You can also copy the source into components/ui/cook-loading.tsx (view on GitHub).
Usage
import { CookLoading } from '@/components/ui/cook-loading'Props
| Prop | Type | Default | Notes |
|---|---|---|---|
progress | number | — | Real 0–100 progress; omit for indeterminate loading. Clamped to range; non-finite values are ignored. Never advances itself. |
state | 'loading' | 'done' | 'error' | — | Host-controlled state. If omitted, progress 100 becomes done; otherwise loading. |
label / description | string | 'Cooking things up…' / state-aware description | Caption and supporting text. Empty description hides the second line. |
doneLabel / errorLabel | string | 'Ready to serve.' / 'Something needs another try.' | Completed and failed captions. |
showLabel | boolean | true | Hide visual captions without removing accessible status. |
size / speed | number | 280 / 1 | Illustration width (160–480px, never wider than parent) and speed multiplier (0.5–2). |
accent | string | — | CSS color for the illustrated backdrop; defaults to theme-aware Framekit orange. |
paused / defaultPaused | boolean | false | Controlled / initial animation pause. Progress and loading continue while the illustration is paused. |
onPausedChange | (paused: boolean) => void | — | Requested pause state change; controlled callers must update paused. |
onRetry / retryLabel | () => void / string | undefined / 'Try again' | Optional error recovery button. The host performs the retry and updates state. |
theme | 'auto' | 'light' | 'dark' | 'auto' | Follow nearest theme scope or force a theme. Reduced motion shows a still chef without steam. |
className | string | — | Root layout and spacing overrides. Set size for illustration width. |
Dependencies
motionlucide-react
Related Loading components
- Hourglass Loader
A brass-and-glass hourglass: sand drains from the upper bulb through a trickling stream into a growing mound, and in endless mode the glass turns itself over on a spring when the top runs dry. Pass…
- Login Gate Intro
A lock-screen preloader: oversized clock, generated avatar card, a password field that types itself, a three-step sign-in sequence, then the site fades up. Skip link included; reduced motion opens…
- Orbital Bead Loader
Beads orbit a core; hover speeds up.
- 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.
- Lattice Pulse Loader
3×3 nodes pulse in a traveling wave.