Table of Contents

Struct MotionVariant

Namespace
Velvet
Assembly
Velvet.Docs.dll

One entry of a V.Motion(variants:) map: the utility-class string naming a pose, plus an optional transition the swap into that pose plays on. A string converts implicitly, so a pose that takes the Motion's own transition: is still written as the class string alone.

public readonly struct MotionVariant

Constructors

MotionVariant(string?, StyleTransitionConfig?)

Properties

ClassName

The utility-class string applied while this variant is the active pose. Merged on top of the Motion's own className; null or empty applies nothing. A variant enter requires a class on the Initial pose it starts from, so an Initial pose leaving this empty is no variant enter at all: the mount enter is skipped and the element rests at Animate's pose from the start. An Exit pose leaving it empty is still a variant exit, which takes the resting pose's classes off.

Transition

The transition a swap INTO this variant plays on: a mount enter whose Animate names it, a runtime label change to it, and a removal whose Exit names it. The destination pose supplies it whether or not it applies a class. Null falls back to the enclosing V.Motion's own transition: — itself StyleTransition's Fade preset when the call site left that out. Same delegate-outward shape as Transition, without its carry-forward from the previous step: a variant map has no order to carry along. The child-orchestration knobs (StaggerChildrenSec, DelayChildrenSec, When) are read from whichever config drives the swap, so declaring them here orchestrates the inheriting descendants of a swap into this pose.

Operators

implicit operator MotionVariant(string?)

A pose taking the Motion's own transition:.