// the find
TopWidgets/SwingAnimation
小组件平移动画 | Widget on the Move, A Playful Animation
SwingAnimation adds horizontal and vertical translation animations to iOS WidgetKit widgets — the kind of motion you'd use to make widget content slide or bounce. It's a micro-library targeting a very specific gap: WidgetKit's animation support is limited, and this fills one small corner of that gap. Useful if you're building a widget app and want physics-y motion without rolling your own ViewModifier.
SPM support is clean and the integration is two lines of code. The chainable modifier API (.swingAnimation stacked twice) is idiomatic SwiftUI. CI is wired up with a lint pass, which is more than most tiny widget libraries bother with. iOS 14 minimum means it works on a wide device base without restricting to newer WidgetKit features.
Last commit was November 2023 — over two years ago — and WidgetKit has moved significantly since then (interactive widgets, control widgets, StandBy). The library is three source files total; there's almost nothing here, and a senior dev would just write the ViewModifier themselves in 20 minutes rather than take a dependency. The test file exists but almost certainly contains no meaningful assertions given the scope. No documentation beyond the README GIF, so if the animation math doesn't do what you need, you're reading the source.