Skip to content

Timer

Timer widget

Name Description
component timer
direction which direction the timer should go up | down
duration duration string, e.g. "30 seconds", "10 minutes"
initTimer a pre-timer duration, this will count prior to the main timer and always goes down
onTimerFinish action to call when the timer completes
checkpoints check point actions
initCheckpoints init timer check point actions

Checkpoint action

  • duration: when the checkpoint should fire
  • action: any valid action
  • param: object to pass to the action

Example

{
  "component": "timer",
  "styles": {
    "fontSize": 46,
    "color": "#26A3B3",
    "textAlign": "center",
    "fontWeight": 800,
    "fontFamily": "Lato"
  },
  "autoStart": false,
  "direction": "forward",
  "duration": "{data.$.final.high} {data.$.final.countUnit}",
  "initTimer": "3 seconds",
  "onTimerFinish": {
    "target": "dynamic",
    "options": {
      "body": "\\ your code goes here"
    }
  },
  "initCheckpoints": [
    {
      "duration": "1 second",
      "action": "effect",
      "param": {
        "audio": "timer-ending"
      }
    },
    {
      "duration": "2 second",
      "action": "effect",
      "param": {
        "audio": "timer-ending"
      }
    },
    {
      "duration": "3 second",
      "action": "effect",
      "param": {
        "audio": "timer-ends"
      }
    }
  ],
  "checkpoints": [
    {
      "name": "minimum timer",
      "duration": "{data.$.final.low} {data.$.final.countUnit}",
      "action": "effect",
      "param": {
        "audio": "timer-checkpoint"
      },
      "ignore": "0 s"
    }
  ],
  "id": "center-timer",
  "tag": "#F3D1FB"
}