gitwtfhub

wtf is motion?

insidegui/motion — explained in plain English

Analysis updated 2026-08-03 · repo last pushed 2025-08-23

2SwiftAudience · developerComplexity · 3/5QuietSetup · easy

TL;DR

A Swift animation library for iOS, macOS, and tvOS that uses real-world physics like springs and momentum to create natural, interruptible animations that respond seamlessly to user touch gestures.

Mindmap

mindmap
  root((repo))
    What it does
      Physics-based animations
      Interruptible gestures
      Reports current values
    Tech stack
      Swift
      SIMD
      SwiftUI support
    Use cases
      Drag chat bubbles
      Photo gallery swiping
      Touch-responsive UI
    Audience
      iOS developers
      UX-focused builders
      Apple platform apps

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Build a messaging app where users can drag chat bubbles around the screen with natural physics.

REASON 2

Create a photo gallery where swiping causes images to bounce back into place naturally.

REASON 3

Add interruptible spring animations to custom UI elements that respond to flick and drag gestures.

What's in the stack?

SwiftSIMDSwiftUI

How it stacks up

insidegui/motionarpitbhalla/swift-appheymeco/mecoserial
Stars222
LanguageSwiftSwiftSwift
Last pushed2025-08-232022-12-19
MaintenanceQuietDormant
Setup difficultyeasyhardmoderate
Complexity3/52/53/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · easy Time to first run · 5min

Drop-in Swift library for Apple platforms, no external infrastructure or dependencies required.

Wtf does this do

Motion is a tool for iOS, macOS, and tvOS developers who want to build user interfaces that feel incredibly fluid and responsive to touch. Instead of relying on standard, predefined animations, it lets you create animations based on real-world physics, like springs and momentum. This is especially useful for building interfaces where users drag, flick, or interact with elements on screen, allowing those elements to react naturally to the speed and direction of a user's gesture. At its core, the library lets a developer set up an animation, give it a target destination, and start it. As the animation runs, it constantly reports back its current value, which the developer uses to update the position or size of an on-screen element. What makes it special is that these animations can be interrupted. If a user grabs an element while it is still moving, the animation seamlessly stops, catches the exact position and speed of the user's touch, and redirects the movement without any jarring jumps or glitches. This project is built for app developers who care deeply about creating highly crafted, delightful user experiences. For example, if you are building a messaging app where a user can drag a chat bubble around the screen, or a photo gallery where swiping causes images to bounce back into place, this tool handles the complex math to make that dragging and bouncing feel perfectly natural. It works alongside standard Apple interface tools and even supports modern SwiftUI apps. One notable thing about the project is how it prioritizes performance. It uses a technology called SIMD, which allows it to process multiple numbers at the exact same time rather than one by one, making the physics calculations extremely fast. However, it makes a specific tradeoff: unlike some built-in Apple animations that run outside the app in a separate protected process, this tool runs directly inside the app. This means developers need to be mindful not to overload their app while these animations are running, treating them with the same care they would a scrolling feed.

Yoink these prompts

Prompt 1
Using the Motion library in Swift, create a draggable view that follows the user's finger with spring physics and can be interrupted mid-animation when grabbed again.
Prompt 2
Show me how to set up a Motion animation with a spring configuration that moves a UIView to a target position and reports back its current value on each frame.
Prompt 3
Build a SwiftUI photo card that the user can flick off screen, where it decelerates naturally based on the flick speed and direction using Motion physics.
Prompt 4
Implement a tvOS focus effect using Motion where elements smoothly spring into focus when selected by the user.

Frequently asked questions

wtf is motion?

A Swift animation library for iOS, macOS, and tvOS that uses real-world physics like springs and momentum to create natural, interruptible animations that respond seamlessly to user touch gestures.

What language is motion written in?

Mainly Swift. The stack also includes Swift, SIMD, SwiftUI.

Is motion actively maintained?

Quiet — no commits in 6-12 months (last push 2025-08-23).

How hard is motion to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is motion for?

Mainly developer.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.