← Declarative motion

Motion.Sequence

luastra/motion

Motion.Sequence is part of the declarative motion model consumed by supported UI motion properties. It describes deterministic values and timing; the host scheduler applies frames without rerunning app.render for every animation frame.

Before you use it

Add luastra/motion to this module's dependencies in luastra.json, then import it with require("luastra/motion"). Motion itself needs no capability; a visible result requires ui.render and a component that accepts the returned descriptor through its motion field.

How it fits

Motion types describe immutable timing data and are erased after analysis.

When to use it

Use Motion.Sequence when declaring motion separately from UI layout and assigning it to a component's motion property. Keep the value deterministic and within the documented channels so every host can reproduce the same transition.

Fields or definition

ParameterType / valuesDescription
kind"sequence"Literal discriminator identifying the exact alternative in this union.
steps{ Tween | Wait }Ordered Tween and Wait values executed as one channel sequence.
iterationsnumberNumber of times the declared sequence or preset repeats.

What happens next

A checked descriptor, sequence, channel map, or easing value.

Failures and fixes

Unknown options, invalid bounds, or unsupported channels fail validation. Motion must not drive application logic; use Timer for state changes, and rely on the host to present the final state when reduced motion is enabled.

Availability

Public-source alpha API in 0.5.0-alpha; presentation follows host and reduced-motion policy.

Exact declaration

export type Sequence = { kind: "sequence", steps: { Tween | Wait }, iterations: number }

Complete inventory

View all pages in Declarative motion
← Previous: Motion.WaitNext: Motion.Descriptor →