How do I add cinematic motion to templates?
Choreographed text reveals, counters, camera moves, film texture and per-render motion control for video templates, via Studio or the API.
Published ·Updated
Motion is the cinematic layer on top of animations: staggered text reveals, count-up stats, relational choreography, press and sleep beats, SVG draw-on, camera moves and film texture. Enter/exit/ambient animations describe how a single layer arrives, lives and leaves; motion describes how the whole page performs.
Motion is designed API-first: everything on this page can be authored as JSON (by hand or by an AI agent through the Orshot MCP), edited in Studio, and tuned per render through modifications.
How it activates#
Adding a motion object to any element (or to a page) switches that page's video rendering to the motion engine. Pages without motion render exactly as before, and legacy transitions on other layers keep working on a motion page. Static formats (png, jpg, pdf, …) ignore motion entirely and render the final designed state.
{
"id": "stat",
"type": "text",
"content": "0",
"motion": {
"count": { "from": 0, "to": 99.9, "duration": 1.4, "decimals": 1, "suffix": "%" }
}
}Element motion#
All keys and sub-params are optional unless marked. Out-of-range values are clamped, never rejected.
| Key | Params (defaults) | Effect |
|---|---|---|
reveal | by: "word"|"char" (word), stagger: 0.07, duration: 0.7, dy: 120, style: "rise"|"fade"|"blur"|"scale"|"mask" (rise), ease | Staggered text reveal. The headline entrance. Text layers only, up to 400 words. See reveal styles |
typewriter | duration: 1.6, delay: 0 | Text types itself. Plain text layers only |
count | to (required), from: 0, duration: 1.4, decimals: 0, prefix, suffix, ease: "power1.out", separator | Number counts up in place. The stat primitive. separator: true prints 485,000 (or pass ",", ".", " ", "'"); ease: "none" counts at a steady rate, for a timer |
wake | duration: 0.6, from: up|down|left|right|none, distance: 34, offset: 0 | Directional entrance. Under 0.3s reads as a hard cut-in |
after | element (required, an element id), offset: 0 | Start relative to another element finishing its entrance. The choreography primitive: chain layers instead of hand-timing showAt |
pulse | from: 0.97, to: 1.03, rate: 1.6, axis: "y"|"both" | Ambient scale breathing (a live badge, a recording dot) |
float | amp: 6, rate: 2.4 | Ambient vertical drift |
press | at (required, seconds), dip: 6 | One-shot press dip in pixels: a button being clicked, on its exact frame |
sleep | at (required), duration: 0.45 | The layer exits early, freeing the stage |
drawIn | duration: 0.9, delay: 0, hidden: false | SVG strokes draw themselves. SVG layers only. delay is in seconds after the layer appears (its Show At), for the layer and for each svg target alike. hidden: true keeps a stroke-only shape (no fill) invisible until its draw starts (a round or square cap otherwise sits as a dot while it waits); a filled shape stays visible and only its outline draws |
svg | animate: true, targets (each with selector plus any of drawIn, spin, pulse, origin, keyframes, clock, repeat, repeatDelay) | Animate inside an SVG layer by CSS selector: animated textured backgrounds, spinning marks, and the parts of a drawn illustration. See SVG parts |
keyframes | Up to 40 poses, each with at (required) plus any of x, y, scale, rotate, opacity, ease, scaleX, scaleY, blur, skewX, skewY, clip, color, fill, z | Explicit track when no behavior fits. Offsets are from the layer's designed position. See keyframes |
after chains adapt automatically: if a render-time modification makes a headline longer, everything chained after it re-times to the real reveal length.
SVG parts#
An SVG layer with svg.animate: true is rendered as live markup, so motion can reach inside it. Each target names the parts with a CSS selector (#yolk, g.domino, path) and gives them drawIn, spin, pulse or a keyframes track. Part keyframes take at, x, y, scale, scaleX, scaleY, rotate, opacity and ease, with the same rules as layer keyframes, except that x and y are in the SVG's own units (its viewBox). origin sets the pivot for the part's scale and rotation, as a transform origin such as "50% 100%", "bottom left" or "0% 100%"; the default is the part's centre.
The layer's content is the SVG as an inline data:image/svg+xml, URI (percent-encoded), or the direct URL of an SVG in your brand library, which the renderer fetches and inlines the same way. Only Orshot's own storage serves SVGs this way; any other URL renders as a plain image. The markup is sanitized before it becomes live: svg, g, path, the basic shapes, defs, gradients, clipPath, mask, symbol, use (same-document href="#id" only), text and tspan survive; scripts, foreignObject and external references do not. A moving part should carry its id on an inner <g> and any static placement (transform) on an outer one, because the animation writes the part's transform.
Draw an illustration as one SVG with an id per moving part, keep static placement on an outer group and animate an inner one, then describe each part's motion:
{
"svg": {
"animate": true,
"targets": [
{ "selector": "#shell-left", "origin": "100% 100%", "keyframes": [{ "at": 0, "x": 28, "rotate": 10 }, { "at": 0.6, "x": 0, "rotate": 0, "ease": "back.out(1.6)" }] },
{ "selector": "#yolk", "keyframes": [{ "at": 0.4, "scale": 0 }, { "at": 0.9, "scale": 1, "ease": "back.out(2)" }] }
]
}
}Part keyframe times are on the page clock by default. Set clock on a target to count them from the layer instead: "layer" starts at the layer's Show At (after any after shift), and "entered" starts when the layer's entrance ends. If you then move the layer's Show At, its parts move with it.
A ring, bounce or wiggle is one cycle of keyframes plus repeat: a number of extra plays from 1 to 100, or -1 to repeat until the layer hides or the page ends. repeatDelay adds seconds between plays. For a seamless loop, end the cycle on the same pose it starts with.
{
"selector": "#bell",
"origin": "50% 0%",
"clock": "entered",
"repeat": -1,
"repeatDelay": 0.8,
"keyframes": [
{ "at": 0, "rotate": 0 },
{ "at": 0.1, "rotate": 14 },
{ "at": 0.2, "rotate": -12 },
{ "at": 0.3, "rotate": 0 }
]
}Up to 20 targets per layer and 40 keyframes per target, before repeats; a repeated track plays at most 200 keyframes. SMIL and CSS animations inside the markup are stripped; part motion comes from targets so it seeks frame by frame like everything else.
- A
drawIntarget that matches a group (<g>) draws every stroke inside it in a quick cascade (each stroke starts 0.04s after the previous one and runs the fullduration). - Parts are clipped to the SVG's
viewBox. Leave room in theviewBoxfor a part that grows, stretches or travels past the drawing. - One part takes one moving track. Two targets that move the same selector conflict: the later one's first pose holds from the start. Wrap the part in a nested
<g>with its own id and give each motion its own selector. - A channel a keyframe leaves out returns to rest. To hold
scaleYthrough a keyframe that only fades, repeat thescaleYvalue in it.
Keyframes#
A keyframe is a pose at time at, in seconds on the page clock (a layer with Show At 2 that should move half a second after it appears has its keyframe at 2.5); the layer tweens from one pose to the next. The first keyframe is the pose until its at; a channel a keyframe leaves out returns to rest.
| Key | Value | Effect |
|---|---|---|
x, y | px | Offset from the designed position |
scale, scaleX, scaleY | number | scale: 1 is the designed size |
rotate, skewX, skewY | degrees | Skew is clamped to ±89 |
opacity | 0 to 1 | |
blur | px, 0 to 200 | A focus pull: 12 to 0 on a stamp that slams in |
clip | { top, right, bottom, left } in % of the layer | An inset that reveals or hides a layer edge-first: a leader line draws by going from right: 100 to 0 |
color | CSS colour | Text colour (text layers) |
fill | CSS colour | Fill (shape layers) |
z | integer | The layer's stacking order from this keyframe on; a step, never a tween. A card that slides behind another |
ease | string | The ease into this keyframe: GSAP names (power1 to power4, expo, sine, circ, back, elastic, bounce, steps, with .in, .out or .inOut and optional arguments such as back.out(1.7)), none, a CSS keyword or cubic-bezier(). Default power1.inOut |
Colours are hex, rgb()/rgba() or hsl()/hsla(). Out-of-range numbers are clamped; a fill on a non-shape layer and an unrecognised ease are warnings.
{
"id": "stamp",
"type": "image",
"motion": {
"keyframes": [
{ "at": 0, "scale": 1.7, "blur": 12, "opacity": 0 },
{ "at": 0.45, "scale": 1, "blur": 0, "opacity": 1, "ease": "expo.out" },
{ "at": 2.4, "x": -320, "rotate": -6, "z": 0, "ease": "power3.inOut" }
]
}
}Reveal styles#
reveal.style picks how each word or character arrives; reveal.ease overrides the style's ease (same names as keyframe eases).
| Style | Effect | Default ease |
|---|---|---|
rise (default) | Rises by dy and fades in | power3.out |
fade | Fades in, in place | power3.out |
blur | A soft focus-in with a quarter of the rise. Subtitles and supporting lines | power3.out |
scale | Pops up from 40% | back.out(1.7) |
mask | Each line rises out of a slot and stays masked, with no fade. Headlines | expo.out |
Page motion#
Set on the page itself as pages_data[n].motion:
| Key | Params | Effect |
|---|---|---|
look | grain: 0–0.2, vignette: 0–0.6 | Film texture over the whole page. Grain 0.04–0.08 and vignette 0.2–0.35 are tasteful ranges. Also editable in Studio from the timeline timer popover |
camera | moves: [{ at, duration, x, y, zoom, ease }], up to 20 | Whole-canvas camera. Every layer moves together; the grain/vignette stay fixed like a real lens |
groups | { "<groupId>": { keyframes, wake, float, pulse, press, sleep, after } } | Moves every layer that carries that groupId as one piece, about their joint centre: a card with its label, an app screen with its UI. See animated groups |
Camera moves are absolute-time (at and duration both required), play in sequence, and the camera holds where a move leaves it. To return, author an explicit move back to zoom: 1, x: 0, y: 0. Keep moves sparse and motivated: one push-in while a key element animates beats constant drift.
Animated groups#
Give the layers that belong together the same groupId, then describe the group's motion once under page.motion.groups. The group takes the same behaviors a layer takes for movement (keyframes, wake, float, pulse, press, sleep, after); its members keep their own entrances and text behaviors.
{
"motion": {
"groups": {
"phone": { "keyframes": [{ "at": 0, "scale": 1.9, "y": 420 }, { "at": 1.2, "scale": 1, "y": 0, "ease": "power3.inOut" }] }
}
},
"elements": [
{ "id": "phone-frame", "type": "image", "groupId": "phone" },
{ "id": "phone-ui", "type": "image", "groupId": "phone", "motion": { "wake": { "offset": 0.3 } } }
]
}A group id must not be a layer id. A group with no visible member does nothing (warning), and layers that sit between a group's members in the stack draw below the group while it moves (warning).
Studio controls#
Select a layer and open the Animate tab:
- Start (in the Visibility section) sets
after: choose "After layer" plus an Offset instead of computingShow Atby hand. Layers that already depend on the current one are excluded, so you cannot create a cycle - Behaviors hosts Count up, Press, Leave early (
sleep) and Draw in - Look (grain and vignette) lives in the timeline's timer popover
- The editor preview plays the exact same engine the renderer uses, so scrubbing the timeline shows the true output
Camera, wake, keyframes, groups and svg targets are JSON/API-only by design.
In a film, every page is a scene and all of the above counts from that scene's start; the cuts between scenes are the pages' transitionIn, not motion.
Validation and warnings#
Template create and update validate motion at write time:
- Structural problems fail with a 400 listing each issue: a missing or cyclic
afterreference, a non-numericcount.to, more than 200 animated layers on a page, or arevealon more than 400 words - Unknown or misspelled keys never fail. They are ignored at render and returned in the response
warningsarray with a suggestion (unknown motion param 'pluse' — did you mean 'pulse'?). Always readwarnings: a warned param is doing nothing - Renders themselves never fail on motion. A page whose motion would need more than 2000 tweens, or that cannot be compiled, renders with its legacy animations instead. Motion past 120s is cut at 120s
When an agent creates or updates a template through the Orshot MCP, its design checks also add pacing warnings ("Cut too soon", "Dead stretch", "Too fast to read"). They measure the page against its text: a viewer reads the blocks in the order they enter, at about 2.5 words a second from when each block starts entering, then the page holds about 1s before the cut. "Dead stretch" means nothing enters, changes or leaves for more than 3s once the text is read (5s on a page with a video layer). Time animations to the content: wipes and line draws 2-3s, labels and rows 0.3-0.4s apart, scene transitions 0.9-1.2s.
Per-render motion control#
Every motion param is tunable at render time through modifications, using the stored schema's own path after a .motion. prefix:
{
"templateId": "your-template-id",
"modifications": {
"weekly_stat": "742",
"cta.motion.press.at": 3.2,
"hero.motion.wake.duration": 0.8,
"badge.motion.pulse": null,
"motion.look.grain": 0.1,
"motion.camera.moves": [{ "at": 2, "duration": 1.5, "zoom": 1.06 }]
}
}parameterId.motion.<path>overrides (or adds) element motion. The layer must have Parameterize on; a layer'siddoes not work here.motion.<path>orpageN@motion.<path>addresses the pagenullremoves a behavior for that render- Array params (
camera.moves,keyframes,svg.targets) take the whole array as the value - Count inference: modifying a count layer's parameterized content to a number makes the counter count to that number.
"weekly_stat": "742"is all a data-driven stat needs - Unknown paths come back in the render response
warnings(and theX-Orshot-Warningsheader) with a did-you-mean; values are clamped exactly like stored params
Recipes#
- Results story — stat layers with
countandsuffix, supporting rows chained withafter, one camera push at the payoff - Launch hero — headline
reveal, subtitleafterthe headline (offset 0.15), cardswakeup 0.15s apart, CTA withpulseand apressat the end - Live badge —
pulseon a dot shape,floaton its card - Animated background — a full-canvas SVG layer with
svg.targetsdrawing paths in and spinning a ring, pluslook.grain0.05
For the machine-readable version of this page (agents), see the orshot://template-design-spec MCP resource.
Ready to automate?
Start rendering images, PDFs and videos from your templates in under 2 minutes. Free plan, no credit card.
Get your API key- Image, PDF and video generation via API
- Visual editor with AI and smart layouts
- Zapier, Make, MCP and 60+ integrations
- White-label embed for your own app
- 100 free credits a month, no credit card required