Skip to main content

Module motion

Module motion 

Source
Expand description

Declarative widget motion.

Motion is described during widget building and evaluated by the runtime from an explicit clock. Application code declares targets; shells never call back into user code per frame.

Structs§

ActiveMotion
Runtime transition currently being advanced by the clock.
Motion
Native motion wrapper for app-owned or framework-owned widgets.
MotionDeclaration
Runtime declaration emitted by motion widgets during build.
MotionEvalInput
Inputs used when evaluating a MotionExpr.
MotionStateMap
Runtime storage for active motion values.
MotionSyncResult
Result of synchronizing declarations into MotionStateMap.
MotionTrack
A single declarative animation from a start value to a target expression.
Presence
Presence wrapper that keeps a child mounted while enter/exit tracks run.
RippleFx
Pointer-origin ripple effect configuration.
RippleLayer
Wrapper that enables deterministic pointer-origin ripple effects.
SpawnedRipple
A ripple instance spawned by pointer input.

Enums§

MotionDeclarationKind
Payload for a MotionDeclaration.
MotionEasing
Easing curve applied to tween progress.
MotionExpr
Declarative expression evaluated by the motion runtime.
MotionPhase
The rendering stage affected by a motion track.
MotionPredicate
Runtime interaction predicate that can branch inside a MotionExpr.
MotionPropertyId
Identifies the property a MotionTrack animates.
MotionStartValue
Defines where a motion track starts from when a new target is synchronized.
MotionTransition
Timing model for a MotionTrack.
MotionValue
A typed value produced by a MotionExpr or held in MotionStateMap.
PresencePhase
Runtime lifecycle phase for a Presence widget.
RipplePlacement
Placement of a ripple layer relative to the wrapped child.
SurfaceMotion
Generic surface motion preset used by custom widgets and framework internals.

Traits§

IntoMotionId
Converts user-facing motion identifiers into stable WidgetId values.

Functions§

appear
Convenience wrapper for applying tracks to a child immediately.
collapse_x
Creates a width collapse/expand track from zero to intrinsic width.
collapse_y
Creates a height collapse/expand track from zero to intrinsic height.
color
Creates a color expression.
dedupe_tracks_later_wins
Removes duplicate tracks so the last track for each property/phase wins.
deg
Creates a degree expression.
fade
Creates an opacity fade-in track.
follow_x_and_width
Creates tracks that follow another widget’s x-position and width.
hover_press
Creates a hover/press scale feedback track for a widget id.
interactive
Convenience alias for interaction-driven motion.
layout
Convenience alias for layout-oriented motion.
presence
Convenience wrapper for presence motion.
px
Creates a logical pixel expression.
reverse_tracks_for_exit
Produces exit tracks by reversing explicit enter start values.
ripple
Convenience wrapper for adding a ripple layer to a child.
ripple_effect
Returns the default ripple effect configuration.
scalar
Creates a unitless scalar expression.
slide_x
Creates a horizontal slide-in track from offset pixels to zero.
slide_y
Creates a vertical slide-in track from offset pixels to zero.
sync_motion_declarations
Synchronizes build-time motion declarations into runtime state.
tick_motion
Advances active motion to current_time and returns changed properties.