use-ui-motion 0.1.0

Motion semantics primitives for RustUse UI
Documentation
  • Coverage
  • 20.59%
    7 out of 34 items documented1 out of 15 items with examples
  • Size
  • Source code size: 6.05 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 701.96 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 10s Average build duration of successful builds.
  • all releases: 10s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • RustUse/use-ui
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • CloudBranch

use-ui-motion

Motion semantics primitives for RustUse UI.

Purpose

use-ui-motion describes durations, curves, motion preferences, easing metadata, transition kinds, and animation states. It does not depend on animation libraries or run animations.

Example

use use_ui_motion::{AnimationState, Easing, MotionCurve, MotionDuration, MotionPreference};

let duration = MotionDuration::from_millis(150);
let easing = Easing::new(MotionCurve::EaseOut, duration);

assert_eq!(easing.duration().millis(), 150);
assert!(MotionPreference::NoPreference.allows_motion());
assert!(AnimationState::Finished.is_terminal());

Main types

  • MotionDuration
  • MotionCurve
  • MotionPreference
  • Easing
  • TransitionKind
  • AnimationState

Facade relationship

The use-ui facade exposes this crate as use_ui::motion when the motion or full feature is enabled.