countdown
The countdown component functionality counts down from a date, date/time, and time. When the time expires, you can configure an outcome, for example, open a different jig, or perform an action. The countdown starts as soon as the jig containing the component.countdown opens

Configuration options
Some properties are common to all components, see Common component properties for a list and their configuration options.
expiresAt
Add a date, date/time or time when the countdown must expire/stop, either using:
datasource, e.g.
[email protected]expression, e.g.
=$fromMillis($toMillis($now()) + 50000)string, e.g.
"2025-09-20 18:00", or"2025-07-25T17:30:00+02:00"
align
center, left, right, and stretch, with center as the default if the property is not specified in the YAML.
labels
isVisible-trueorfalsewithtrueas the default. Settingfalsewill hide the countdown component.position- The countdown labels of Days : Hours : Minutes: Seconds are shown at thebottomortopof the countdown.
size
Choose from extra-large, large, medium, small, with large being the default if the property is not specified in the YAML.
onPress
Choose from the provided list of available actions, for example, use the go-to action to open a different jig.
onFinish
Choose from the provided list of available actions. For example, go-back action.
Considerations
This component's function is to countdown to a predefined date/time. It is not recommended to use the component as a timer.
The
component.countdowncan only be used in ajig.default.The countdown's separator is by default shown as a colon
:.The countdown starts when you navigate to the jig containing the
component.countdown.Use any inputs for the countdown configuration, for example, different types of datasources, states and inputs.
Use the
set-stateandreset-stateactions to set and reset the countdown.
Examples and code snippets
Countdown with inputs (static, dynamic, expression, & datasource)

This example shows the expiresAt property value set using a static value, an expression, a static datasource, and a dynamic datasource.
Example: See the full example in GitHub.
Countdown with alignment
You can choose to align the component.countdown to the left, right, center and stretch it across the screen.
Example: See the full example in GitHub.
Countdown with different sizes

Use the size property in the component.countdown to change the size from extra-large to small.
Example: See the full example in GitHub.
Countdown onPress
This example shows two scenarios, the first opens a different jig when the component is pressed and the second opens a URL when pressed. Use the onPress property to set up an action when pressing on the component.
Example: See the full example in GitHub.
Countdown onFinish
In this example the onFinish property is used to show a modal when the component.countdown expiresAt property reaches zero.
Example: See the full example in GitHub.
Countdown started from another jig
Last updated
Was this helpful?