Declarative motion

luastra/motion

Declares host-neutral transitions and reusable animation presets without putting a frame loop in application code. Motion values are attached to supported UI properties; host schedulers interpolate them independently and honor reduced-motion preferences.

Build a Tween for one numeric channel, combine Tween and Wait steps with Sequence, or use a preset that returns a complete MotionMap.

Motion changes presentation, not application state. Use Timer and app.handle when a delay must advance game logic or replace content.

Complete example

local Motion = require("luastra/motion")
local UI = require("luastra/ui")

local entrance = Motion.fadeIn {
    durationMs = 240,
}

return UI.Card {
    id = "catalogue/card",
    motion = entrance,
    UI.Text {
        id = "catalogue/title",
        text = "Breathe",
        variant = "heading",
    },
}

Detail pages

Motion.EasingMotion.TweenOptionsMotion.TweenMotion.WaitMotion.SequenceMotion.DescriptorMotion.MotionMapMotion.tweenMotion.waitMotion.sequenceMotion.fadeInMotion.slideInMotion.scaleInMotion.swayMotion.pulseMotion.shakeMotion.flip