A modular animation library for Swift that manipulates values using KeyPaths, easing equations, and motion collections.
MotionMachine is a modular animation library for Swift that provides a powerful platform for manipulating values, whether animating UI elements or interpolating property values in custom classes. It is built from the ground up, not tied to Core Animation, and supports animating along paths, grouping motions, and applying easing equations.
Swift developers building animations for iOS, macOS, visionOS, watchOS, or tvOS apps who need fine-grained control over property animations beyond Core Animation's capabilities.
Developers choose MotionMachine for its modularity, type-agnostic design, and ability to create complex animations by grouping, sequencing, and nesting motion classes with full customization of easing equations and motion behaviors.
A powerful, elegant, and modular animation library for Swift.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
The library's design allows extensive customization, enabling developers to replace or modify motion classes, value types, and easing equations, as highlighted in the README's emphasis on replaceable components.
It animates any class property using Swift KeyPaths, not just UI elements, supporting generic value interpolation with a wide range of easing equations like EasingQuartic and EasingElastic.
Motion classes can be grouped, sequenced, and nested arbitrarily with MotionGroup and MotionSequence, enabling sophisticated animations with reversing and repeating actions at any level.
Supports all major Apple platforms including iOS, macOS, visionOS, watchOS, and tvOS with Swift 6.0, as indicated by the badges and compatibility notes.
Provides status callback closures for motion events, giving fine-grained control over animation lifecycle, which is useful for synchronizing actions or handling state changes.
Structs cannot be used as the top level of a KeyPath, and optionals require default values via subscripts (e.g., \UIView.backgroundColor[default: .black]), adding boilerplate and complexity for some data types.
The modular and powerful design necessitates understanding concepts like Moveable protocols and PropertyData objects, making it less accessible than simpler animation libraries or built-in SwiftUI animations.
As a niche library, it has a smaller community and less third-party support, and the README mentions breaking changes in version 3.0, requiring migration efforts for upgrades.