Build a Weekly Habit Tracker Grid with Streak Counts in One HTML File

Generates a single-file weekly habit tracker where you tap day cells to check off habits, watch streaks and completion percentages update live, and copy a plain-text summary.

You getone complete HTML file in a single code block, then 3 short ideas to extend it.

The prompt

Prompt
Act as a senior front-end developer who builds clean, accessible single-file tools.

Build Steady Week, a weekly habit tracker in one HTML file. Show a grid with one row per habit and seven day columns from Monday to Sunday. Each day cell is a button that toggles done or not done. Preload four realistic sample habits with some days checked, and let the user add and remove habits.

Rules:
1. Controls: tap or click a cell to toggle it. Arrow keys move focus between cells, and Space or Enter toggles. A text field plus an Add button (Enter also works) adds a habit, up to 12. Each row has a remove button. Include a Clear week button.
2. Stats: each row shows its current streak, counting back from today, and its week percentage with a small progress bar. A header shows overall completion, total check-ins and the top streak, all updating instantly.
3. Today's column is highlighted. Show each weekday's date number under its name.
4. Nothing is saved, so include a read-only plain-text weekly summary with a Copy summary button. If the clipboard is blocked, select the text and tell the user to press Ctrl+C.
5. Design: warm off-white background, one teal accent, system fonts, rounded cards and a clear type scale. Must fit 360-1280px, with the grid scrolling sideways on narrow screens.
6. Play a soft synthesized tick on toggle using the Web Audio API, started on first interaction, with a visible mute toggle. Respect prefers-reduced-motion. Use no external resources and no storage.

Output format: one complete HTML file in a single code block, then 3 short ideas to extend it.

Example output

One HTML file. Save it and open it in any browser.Open full screen

Example: Steady Week, a tap-to-toggle weekly habit grid.

Four sample habits load with some days already checked. Tap any day cell to mark it done and the streak 🔥, row percentage and header totals update instantly. Use the arrow keys to move around the grid and Space to toggle. Add your own habit with the text field, remove one with ×, then press Copy summary to grab a plain-text recap with ■/□ day squares. Use the mute button to silence the soft tick.

Written by AI from this prompt. Your results will vary.

Tips and common edits

Why this works

  • Every cell is a real button with aria-pressed, so mouse, touch and keyboard all work with no extra wiring.
  • The streak rule (count back from today, or from yesterday if today is open) is spelled out, so the numbers make sense.
  • The copyable summary with a manual-copy fallback replaces storage, so the tool still works in sandboxed previews.

Paste the prompt into ChatGPT, Claude or Gemini. Save the returned code as steady-week.html and open it in any browser, or run it in the chat's preview or canvas panel. Copy your summary before you close the tab.

Common edits

  • Change the accent color and sample habits to match a theme, such as fitness, study or sleep routines.
  • Switch to a 14-day grid or add a weekly goal per habit (for example 5 of 7) and show a badge when it's met.

Prompt details

By
Prompts-GPT editors
Published

Did this prompt work?

Keep exploring

More in Mini Apps & Tools