laconicman/kapow
Delightful, physics-driven effects for UIKit — a port of
Direction docs
The authoritative architecture, plan, and debt register live under docs/: Design (decisions + rejected alternatives), Roadmap (Now/Next/Later), Tech-Debt (KP-# register), and API-Coverage (what of Pow's surface is here, and what isn't). The notes below are a summary; those docs are authoritative.
The catalog
Change effects fire once per call: shake(rate:), wiggle(rate:), jump(height:), spin(rate:axis:…), shine(duration:) / shine(angle:duration:), glow(color:radius:), pulse(shape:color:drawingMode:count:), spray(origin:images:), rise(origin:images:), and the haptic/sound feedback(…) family.
Conditional effects follow a boolean: pushDown(isActive:), glow(isActive:…), smoke(isActive:…), plus repeating(every:isActive:_:) to repeat any change effect.
Pow's transitions are deliberately not ported — insert/remove choreography is a different lifecycle in UIKit (Design § Scope).
Guarantees
- Never retains your view or its view controller. A view deallocating mid-effect tears the
effect down; no completion closure can outlive the screen.
- Concurrent effects compose. Transform effects publish into a per-view compositor, so a shake
during a jump does not clobber either — nor the view's own transform.
- Reduce Motion aware. Motion effects no-op when it's on; the feedback effects are exempt
because they aren't motion.
- Idle-free. Frame clocks exist only while an effect is live.
Installation
Swift Package Manager:
.package(path: "../KaPow") // or the Git URL once publishedThen import KaPow.
Documentation
API reference is hosted on the Swift Package Index, generated from the DocC catalog in Sources/KaPow/KaPow.docc/ per .spi.yml.
To build it locally, target iOS — the package is UIKit-only, so the SwiftPM plugin's default macOS build cannot compile it:
xcodebuild docbuild -scheme KaPow -destination 'generic/platform=iOS' -derivedDataPath .build/docsTests
xcodebuild test -scheme KaPow -destination 'platform=iOS Simulator,name=iPhone 17 Pro'The suite is behavioral as well as numeric: every effect is run on a real view through a live CADisplayLink and asserted to install, animate, and fully clean up after itself.
Showcase
KaPowShowcase is the sample app: every effect rendered side by side with its SwiftUI original, driven by one control, so you can see each one move — and see how faithfully it matches Pow — before adopting it.
git clone https://github.com/laconicman/KaPowShowcase.git
cd KaPowShowcase && xcodegen generate && open KaPowShowcase.xcodeprojLicense
MIT — see LICENSE. Portions are ported from Pow (MIT, © Emerge Tools, Inc.); its terms are reproduced in NOTICE, and every ported file carries an attribution header naming its upstream source.
LICENSE is kept as the verbatim MIT text with no additions, so automated license detection (GitHub, Swift Package Index) recognises it; the attribution lives in NOTICE instead.
Package Metadata
Repository: laconicman/kapow
Default branch: main
README: README.md