QORMQORM v0.8.4 api Get started

Animation

QORM animations are declarative and cross-cutting: any node — a built-in widget or a component instance — can carry an animation prop and play an entrance effect. Entrance effects fire when a node mounts. The live update morphs the DOM in place, so an effect replays when a node is newly created (e.g. an item appended to a bound list), not on every state change.

The animation property (any node)

{ "type": "card", "animation": "fadeup", "duration": 450, "children": [ … ] }

Works the same on a component instance:

{ "type": "ProductCard", "animation": "pop", "props": { "name": "Cup" } }

Tuning props (all optional):

propdefaultmeaning
animationthe effect name (below); bindable"{{state.effect}}" lets an agent swap the animation by changing state
duration450milliseconds
delay0milliseconds before it starts (stagger a list by binding the index)
curvecubic-bezier(.34,1.2,.64,1)easing
repeat1play count (infinite for attention loops)

Effects

slideright, scale, zoomout, rotate, flip, pop.

Animated widgets

For value-driven (not entrance) motion, use the Flutter-style widgets:

— smoothly transition style whenever a bound value changes (duration, curve).

rotationtransition, sizetransition, hero, animatedswitcher) — the same entrance effects as a dedicated wrapper widget.

The plain transition style prop (e.g. "transition": "all .2s") also applies to any node for simple CSS transitions.

Theme motion tokens

Skins carry the motion vocabulary alongside their colors. Each themes/*.json may declare a motion section; the native canvas backend consumes it directly, and the HTML/WebView backend exposes the same values as CSS custom properties:

"motion": {
  "durationFast": 120,
  "durationNormal": 250,
  "durationSlow": 400,
  "easingStandard": "easeOutCubic",
  "easingEmphasized": "easeInOutCubic"
}

easingStandard when the node sets no duration / curve prop — explicit props still win. On the HTML path this lands as var(--qorm-motion-normal) / var(--qorm-motion-standard), which hand-written transition styles can reference too.

easeInCubic / easeOutCubic / easeInOutCubic spellings and the token aliases standard / emphasized).

the WinUI palettes at ~167 ms — switching skins changes the app's tempo.

defaults for the --qorm-motion-* variables. Per-skin JSON values apply on the native canvas backend.