Timer
llms.txtExample
Usage
<Timer bind:timer /> <Button onclick={() => timer.start()}>Start</Button>
API Reference
Timer
A countdown timer display with animated digits. Bind to the timer prop to control it programmatically (start, pause, resume, reset).
Property Type Description
timer $bindable
TimerState
The timer state object. Constructor takes duration in ms (default 10 minutes). Provides methods: start(), pause(), resume(), reset(), and properties: isRunning, isPaused, remaining. Default: —
showHours
boolean
Whether to display the hours digits. Default:
falseshowMinutes
boolean
Whether to display the minutes digits. Default:
trueshowSeconds
boolean
Whether to display the seconds digits. Default:
trueclass
string
Additional CSS classes to apply. Default: —
ref $bindable
HTMLDivElement
The underlying DOM element. Default: —
Property
timer
showHours
showMinutes
showSeconds
class
ref