# Reactions & Triggers

> When this happens, do that — the page's only rule primitive, plus the per-clip triggers in the timeline.

Glider documentation · Logic · Web page: https://cgglider.com/docs/reactions/

Sections of this page: [The model](https://cgglider.com/docs/reactions.md) · [When](https://cgglider.com/docs/reactions/events.md) · [Conditions](https://cgglider.com/docs/reactions/conditions.md) · [Then](https://cgglider.com/docs/reactions/actions.md) · [Chaining, delays & guards](https://cgglider.com/docs/reactions/chaining.md)

When, then, delay.

A reaction is three fields: a when, a then, and a delay in milliseconds. That is the whole primitive — there is deliberately no scripting layer between the event and the action.

```json
{
  "id": "r_goal_home",
  "when": { "kind": "onCompare", "path": "score.home", "op": "gt", "value": 0 },
  "then": { "do": "playClip", "clipId": "c_goalbug", "targetId": "g_lowerthird" },
  "delay": 0
}
```

> **Reactions vs triggers:** Reactions live on the page and can fire anything. Triggers live on an animation clip in the timeline and only start that clip. They overlap — a trigger is the convenient form when you are already editing the animation.
