Day 8: Recipe Conversions Without the Panic (Unit Converter)
Source: Dev.to
It’s Day 8 of 12 Days of Svelte Apps 🎄
Holiday cooking is fun… right up until the recipe switches units on you.
- cups vs milliliters
- ounces vs grams
- Fahrenheit vs Celsius
So today’s mini‑app is the Unit Converter — a clean, fast converter you can keep open while you cook.
🔗 Try it live:
💻 View the code:
What it does
The UI is intentionally simple:
- Pick a unit category (Volume, Temperature, Mass, etc.)
- Enter a value
- Choose “From” and “To” units
- Get a formatted result instantly
It also includes a Swap button to flip the direction quickly and a Clear action to reset the input.
What makes it feel good to use
- Results are formatted cleanly (no unreadable long decimals)
- Handles “same unit” conversions gracefully
- Supports a wide set of categories beyond cooking (length, area, time, angle, data, energy, force, power, pressure)
A few holiday‑friendly conversions to try
Oven temperature
If your recipe says 350 °F but you’re using a °C oven, pick Temperature and convert.
Cups to milliliters
For recipes written in US cups, pick Volume and convert to mL for a measuring jug.
Ounces to grams
For baking (where precision matters), converting to grams can make measuring a lot easier.
If you try it, post a conversion you used today (or a recipe you’re making) and tag me.