WaterTrack gives you two ways to record a drink: tap one of the five quick-log chips for a common preset amount, or drag the custom amount slider to any value you need, then press Log. Either path calls the sameDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/mr-sunset/watertracker/llms.txt
Use this file to discover all available pages before exploring further.
logDrink(amount) function under the hood, immediately adds the drink to your history, updates the running total displayed on screen, and writes everything to localStorage — so your data is never lost on a page reload.
Quick-log chips
The five pill-shaped chips near the top of the screen let you record the most common drink sizes in a single tap — no slider adjustment required.| Chip label | Fluid ounces logged |
|---|---|
| 4 | 4 oz |
| 8 | 8 oz |
| 12 | 12 oz |
| 16 | 16 oz |
| 24 | 24 oz |
logDrink(amount) is called
The chip’s text content is parsed as an integer and passed directly to
logDrink(), which updates the in-memory total, prepends a new entry to the drink list, and saves both values to localStorage.Confetti celebration fires
The
celebrate() helper triggers the bundled confetti library (@hiseb/confetti) with 100 particles at velocity 400, giving you instant visual feedback.Pop animation plays on the counter
The
pop CSS class is added to the #intake element, scaling the number up and flashing it to #6fcdff. The class is removed automatically once the animation ends (see Intake counter animation below).Custom amount slider
When a preset chip size doesn’t match what you drank, use the range slider to dial in the exact amount.- Range: 2 oz to 80 oz
- Step: 2 oz increments
- Default: 8 oz
input event listener updates the #amount-slider-current label above the track in real time so you always see the selected value before you commit to logging it.
The Log button
The Log button is the commit step for slider-based logging. Pressing it triggers the following sequence:Confetti celebration fires
celebrate() is called, launching the confetti burst identical to a chip tap.Pop animation plays on the intake counter
The
pop class is added to #intake, triggering the scale-and-color animation.logDrink() is called with the slider value
The current slider value is read with
parseInt(amountSlider.value, 10) and passed to logDrink(), which persists the drink and updates the total.The intake counter shows the running total for the current session. It does not automatically reset at midnight — the counter keeps accumulating across page loads until you manually clear it. Use the Reset button inside the Settings panel to wipe the total and start fresh each day.
Intake counter animation
Every time a drink is logged — whether via a chip or the Log button — the large#intake number at the top of the page plays the pop keyframe animation:
#6fcdff at the midpoint, then returns to its resting state. The animation runs for 0.4 seconds. Once it ends, an animationend listener removes the pop class so the animation can fire again on the very next drink: