pub struct MotionScheme {
pub shape: AnimationSpec,
pub color: AnimationSpec,
pub color_fast: AnimationSpec,
pub overlay: AnimationSpec,
pub spring: AnimationSpec,
pub expand: AnimationSpec,
pub layout: AnimationSpec,
pub default_spatial: AnimationSpec,
pub fast_spatial: AnimationSpec,
pub slow_spatial: AnimationSpec,
pub fast_effects: AnimationSpec,
}Expand description
Centralized animation specs for M3 motion design.
Fields§
§shape: AnimationSpecShape / size / bounds transitions (e.g., indicator position, elevation). M3 standard: 200 ms FastOutSlowIn.
color: AnimationSpecColor state transitions (e.g., label, tab text, selection). M3 DefaultEffects spring.
color_fast: AnimationSpecQuick color changes (e.g., checkbox fill, switch track, radio ring). M3 FastEffects spring.
overlay: AnimationSpecOverlay / popup enter‑exit (menus, dialogs, tooltips). M3 standard: 120 ms FastOutSlowIn.
spring: AnimationSpecSpring‑based positional animation (sheets, drawers, swipe‑to‑dismiss). M3 standard: gentle spring (ζ = 0.5, k = 200).
expand: AnimationSpecExpanding containers (search bar, docked search suggestions). M3 standard: 250 ms FastOutSlowIn.
layout: AnimationSpecLarge layout transitions (bottom sheet height, scaffold reflow). M3 standard: 300 ms EaseOut.
default_spatial: AnimationSpecM3 DefaultSpatial spring (0.9, 700).
fast_spatial: AnimationSpecM3 FastSpatial spring (0.9, 1400).
slow_spatial: AnimationSpecM3 SlowSpatial spring (0.9, 300).
fast_effects: AnimationSpecM3 FastEffects spring (1.0, 3800).