StealThis .dev
Pages Medium

Cookbook — Recipe Editor (ingredients + steps builder)

A warm, editorial recipe-builder workspace where you compose a dish from scratch: title, description, and meta like prep, cook, servings, difficulty and diet, plus a reorderable ingredients table (quantity, unit, name) and numbered method steps you can drag, nudge or remove. A live preview pane renders a print-ready recipe card that scales quantities by servings as you type, with draft autosave to localStorage and a validated save flow.

Open in Lab
html css vanilla-js
Targets: JS HTML

Code

Recipe Editor (ingredients + steps builder)

A two-pane cookbook authoring tool. On the left, an editor form collects the basics (title, description), recipe meta (prep, cook, servings, difficulty, diet/tags), and two dynamic builders: an ingredients table with quantity, unit and name fields, and a numbered method list of step textareas. Every row can be reordered by dragging its handle or nudged with up/down arrows, and removed with a single control.

On the right, a sticky live preview renders a polished, print-friendly recipe card with a gradient “food photo” hero, a meta strip, and the ingredient and method lists. It updates on every keystroke. A servings scaler recalculates ingredient quantities proportionally, so doubling the batch rewrites the amounts in place without touching your source numbers.

Drafts persist automatically to localStorage, so a refresh restores your work-in-progress. The Save button runs lightweight validation (a title plus at least one ingredient and one step) and confirms with a toast, while Clear restores the sample recipe. Everything is vanilla HTML, CSS and JS — no frameworks, no build step.

Illustrative UI only — recipes & nutrition data are fictional, not dietary advice.