Skip to content

Timer

Countdown or stopwatch with controls.

00
Days
00
Hours
00
Minutes
00
Seconds

Installation

Anatomy

Usage

Controlled

Handle onTick and onComplete to react to timer progress and completion.

Ticks: 0
00
Minutes
00
Seconds

Orientation

Use the orientation prop on TimerItemGroup to change the orientation of the timer.

Vertical

05
minutes
00
seconds

Horizontal

05
minutes
00
seconds

Examples

Countdown

Create a countdown by setting countdown to true and startMs to the initial duration.

05
minutes
00
seconds

Date-based

Use remainingMsUntilDate to derive startMs from a calendar date.

Until May 26, 2026

06
days
23
hours
59
minutes
59
seconds

Interval

Use the interval prop to control update frequency.

00
seconds
000
ms

Pomodoro

Alternate between work and break sessions using onComplete.

🍅
25
00
Focus
Trigger Behavior

Triggers hide when their action is not available. To keep a control in the layout, pass hidden={false}.

Custom separator

Pass children to TimerSeparator to override the default colon (:).

05
00

API Reference

Timer

Root component. Runs a stopwatch or countdown and provides timer state to child parts.

TimerArea

Live region that exposes the formatted time to assistive tech and lays out digit groups.

TimerItemGroup

Groups a TimerItem with its TimerItemLabel and sets stack direction via orientation.

TimerItemLabel

Caption for the adjacent TimerItem (for example, “minutes”).

TimerItem

Renders one time field from the current timer value.

TimerSeparator

Visual delimiter between item groups (defaults to : when children are omitted).

TimerControl

Toolbar row for timer action controls.

TimerActionTrigger

Button that dispatches a timer action.

TimerStart

Starts the timer. Wraps TimerActionTrigger with action="start".

TimerPause

Pauses a running timer. Wraps TimerActionTrigger with action="pause".

TimerResume

Resumes from paused. Wraps TimerActionTrigger with action="resume".

TimerReset

Resets the timer to its initial startMs / idle state.

TimerRestart

Restarts the timer. Wraps TimerActionTrigger with action="restart".

TimerPlay

Shorthand for a single "go" control: renders TimerResume when the timer is paused, otherwise TimerStart.

remainingMsUntilDate

Returns a number of milliseconds until date, or 0 if date is in the past.


For a complete list of props, see the Ark UI documentation.