DEV Community

Cover image for Day 8: Recipe Conversions Without the Panic (Unit Converter)
Michael Amachree
Michael Amachree Subscriber

Posted on

Day 8: Recipe Conversions Without the Panic (Unit Converter)

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: https://svelte-apps.me/apps/unit-converter
💻 View the code: https://github.com/Michael-Obele/Svelte-MiniApps/tree/main/src/routes/apps/(app)/unit-converter

What it does

The UI is intentionally simple:

  1. Pick a unit category (Volume, Temperature, Mass, etc.)
  2. Enter a value
  3. Choose “From” and “To” units
  4. Get a formatted result instantly

It also includes a Swap button so you can flip the direction quickly, and a Clear action to reset the input.

What makes it feel good to use

  • Results are formatted cleanly (so you don’t get unreadable long decimals)
  • It handles "same unit" conversions gracefully
  • It supports a wide set of categories beyond cooking too (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.

Top comments (0)