Magoo Component UI logo Magoo Component UI
← Catalog

Workout Timer

workout-timer molecule experimental

An interval work/rest countdown timer with rounds and start, pause and reset controls.

The width preview needs a screen wider than the chosen width — use a larger device (or a desktop browser) to see the desktop and tablet layouts.

Default

Full-body circuit

Work

00:00

Round 1 of 5

Tabata

Tabata core

Work

00:00

Round 1 of 8

Props

NameTypeReq
work_seconds string
rest_seconds string
rounds string
label string

Related components

How to use

behavior.js reads work/rest/rounds from the root's data-work, data-rest and data-rounds attributes (the portable self-init passes no props). It runs a 1-second interval that counts down, switches work -> rest -> next round automatically, and stops after the final round. On every phase change it dispatches a bubbling "timer:phase" CustomEvent from the root with detail { phase, round, rounds } (phase is "work", "rest" or "done") so a parent can react (play a sound, advance a playlist). The interval and click listeners are cleaned up on teardown. Screenshots don't run JS, so the static display shows 00:00 at round one until Start is pressed.

Use cases

tool WCAG AA SEO 20 dir: both ai-generated