Recipe: replay declarative motion

luastra/motion · stable UI identity · about 15 minutes

Animate a card from alternating directions without a frame loop, layout mutation, timer, or animation state in application code.

You will render one stable card, replay its entrance from the opposite side after each button press, and keep the visible run count in ordinary Luau state.

Motion descriptors declare presentation. The host scheduler owns frames and easing; app.handle changes only meaningful state and the next render supplies the new descriptor.

Do not implement requestAnimationFrame or per-frame state in Luau. Declare bounded motion on a stable semantic node and let the host scheduler honor reduced-motion preferences.

Detail pages

1. Create the project2. Replace luastra.json3. Replace src/main.luau4. Replace tests/smoke.luau5. Check and run6. Understand the boundaries