StealThis .dev

Gym — Nutrition / Macro Log

A daily nutrition tracker for athletes with a calorie ring showing remaining kcal and animated Protein, Carbs and Fat goal bars up top. Meal sections for Breakfast, Lunch, Dinner and Snacks list food entries with calories and per-macro tags plus a remove button, an inline Add-food form appends entries and live-updates every ring and total, and a tappable row of water glasses logs hydration. Bold athletic dark UI in vanilla JS.

Buka di Lab
html css vanilla-js
Targets: JS HTML

Code

Nutrition / Macro Log

A high-energy daily fuel screen for a gym or coaching app. The summary panel pairs a calorie ring — which fills toward the day’s goal, flips red when you go over, and shows the remaining (or surplus) kcal in the center — with three animated macro bars for Protein, Carbs and Fat, each tracking grams against its target with a live percentage.

Below, the day is split into Breakfast, Lunch, Dinner and Snacks sections. Each lists its food entries with calories and color-coded P/C/F tags, a running per-meal kcal total, and a one-tap remove button. The inline Add food form (name, calories, P/C/F) appends a new entry, recalculates the meal total, and instantly re-animates every ring and bar — no page reload. A row of water glasses fills with a single tap so hydration is logged alongside macros.

Everything is vanilla JS with smooth micro-interactions, an accessible toast helper, keyboard- usable controls and visible focus rings, and a responsive layout that collapses cleanly down to roughly 360px. The data is realistic but fictional — illustrative UI only, not medical or dietary advice.