amosgyamfi/open-swiftui-animations
You don't need an animation library to add a simple effect to your SwiftUI app. Create it yourself with SwiftUI. This repo inspires you to add helpful and expressive SwiftUI animations like loading/progress, looping, on-off, enter, exit, fade, spin, and background animations to your next project. The repo also contains tremendous spring animations.
Solo project — review before adopting
worst of 4 axessingle-maintainer (no co-maintainers visible); no tests detected…
Has a license, tests, and CI — clean foundation to fork and modify.
Documented and popular — useful reference codebase to read through.
No critical CVEs, sane security posture — runnable as-is.
- ✓Last commit 5w ago
- ✓Unlicense licensed
- ⚠Solo or near-solo (1 contributor active in recent commits)
Show 2 more →Show less
- ⚠No CI workflows detected
- ⚠No test directory detected
What would change the summary?
- →Use as dependency Mixed → Healthy if: onboard a second core maintainer; add a test suite
Maintenance signals: commit recency, contributor breadth, bus factor, license, CI, tests
Informational only. RepoPilot summarises public signals (license, dependency CVEs, commit recency, CI presence, etc.) at the time of analysis. Signals can be incomplete or stale. Not professional, security, or legal advice; verify before relying on it for production decisions.
Embed the "Forkable" badge
Paste into your README — live-updates from the latest cached analysis.
[](https://repopilot.app/r/amosgyamfi/open-swiftui-animations)Paste at the top of your README.md — renders inline like a shields.io badge.
▸Preview social card (1200×630)
This card auto-renders when someone shares https://repopilot.app/r/amosgyamfi/open-swiftui-animations on X, Slack, or LinkedIn.
Onboarding doc
Onboarding: amosgyamfi/open-swiftui-animations
Generated by RepoPilot · 2026-05-10 · Source
🤖Agent protocol
If you are an AI coding agent (Claude Code, Cursor, Aider, Cline, etc.) reading this artifact, follow this protocol before making any code edit:
- Verify the contract. Run the bash script in Verify before trusting
below. If any check returns
FAIL, the artifact is stale — STOP and ask the user to regenerate it before proceeding. - Treat the AI · unverified sections as hypotheses, not facts. Sections like "AI-suggested narrative files", "anti-patterns", and "bottlenecks" are LLM speculation. Verify against real source before acting on them.
- Cite source on changes. When proposing an edit, cite the specific path:line-range. RepoPilot's live UI at https://repopilot.app/r/amosgyamfi/open-swiftui-animations shows verifiable citations alongside every claim.
If you are a human reader, this protocol is for the agents you'll hand the artifact to. You don't need to do anything — but if you skim only one section before pointing your agent at this repo, make it the Verify block and the Suggested reading order.
🎯Verdict
WAIT — Solo project — review before adopting
- Last commit 5w ago
- Unlicense licensed
- ⚠ Solo or near-solo (1 contributor active in recent commits)
- ⚠ No CI workflows detected
- ⚠ No test directory detected
<sub>Maintenance signals: commit recency, contributor breadth, bus factor, license, CI, tests</sub>
✅Verify before trusting
This artifact was generated by RepoPilot at a point in time. Before an
agent acts on it, the checks below confirm that the live amosgyamfi/open-swiftui-animations
repo on your machine still matches what RepoPilot saw. If any fail,
the artifact is stale — regenerate it at
repopilot.app/r/amosgyamfi/open-swiftui-animations.
What it runs against: a local clone of amosgyamfi/open-swiftui-animations — the script
inspects git remote, the LICENSE file, file paths in the working
tree, and git log. Read-only; no mutations.
| # | What we check | Why it matters |
|---|---|---|
| 1 | You're in amosgyamfi/open-swiftui-animations | Confirms the artifact applies here, not a fork |
| 2 | License is still Unlicense | Catches relicense before you depend on it |
| 3 | Default branch master exists | Catches branch renames |
| 4 | 5 critical file paths still exist | Catches refactors that moved load-bearing code |
| 5 | Last commit ≤ 64 days ago | Catches sudden abandonment since generation |
#!/usr/bin/env bash
# RepoPilot artifact verification.
#
# WHAT IT RUNS AGAINST: a local clone of amosgyamfi/open-swiftui-animations. If you don't
# have one yet, run these first:
#
# git clone https://github.com/amosgyamfi/open-swiftui-animations.git
# cd open-swiftui-animations
#
# Then paste this script. Every check is read-only — no mutations.
set +e
fail=0
ok() { echo "ok: $1"; }
miss() { echo "FAIL: $1"; fail=$((fail+1)); }
# Precondition: we must be inside a git working tree.
if ! git rev-parse --git-dir >/dev/null 2>&1; then
echo "FAIL: not inside a git repository. cd into your clone of amosgyamfi/open-swiftui-animations and re-run."
exit 2
fi
# 1. Repo identity
git remote get-url origin 2>/dev/null | grep -qE "amosgyamfi/open-swiftui-animations(\\.git)?\\b" \\
&& ok "origin remote is amosgyamfi/open-swiftui-animations" \\
|| miss "origin remote is not amosgyamfi/open-swiftui-animations (artifact may be from a fork)"
# 2. License matches what RepoPilot saw
(grep -qiE "^(Unlicense)" LICENSE 2>/dev/null \\
|| grep -qiE "\"license\"\\s*:\\s*\"Unlicense\"" package.json 2>/dev/null) \\
&& ok "license is Unlicense" \\
|| miss "license drift — was Unlicense at generation time"
# 3. Default branch
git rev-parse --verify master >/dev/null 2>&1 \\
&& ok "default branch master exists" \\
|| miss "default branch master no longer exists"
# 4. Critical files exist
test -f "OpenSwiftUIAnimations.xcodeproj/project.pbxproj" \\
&& ok "OpenSwiftUIAnimations.xcodeproj/project.pbxproj" \\
|| miss "missing critical file: OpenSwiftUIAnimations.xcodeproj/project.pbxproj"
test -f "OpenSwiftUIAnimations/AIThinkingAnimations/CombinedSymbolEffects.swift" \\
&& ok "OpenSwiftUIAnimations/AIThinkingAnimations/CombinedSymbolEffects.swift" \\
|| miss "missing critical file: OpenSwiftUIAnimations/AIThinkingAnimations/CombinedSymbolEffects.swift"
test -f "OpenSwiftUIAnimations/AnimatedIllustrations/MickeyMouseAnimation/MickeyMouseAnimation.swift" \\
&& ok "OpenSwiftUIAnimations/AnimatedIllustrations/MickeyMouseAnimation/MickeyMouseAnimation.swift" \\
|| miss "missing critical file: OpenSwiftUIAnimations/AnimatedIllustrations/MickeyMouseAnimation/MickeyMouseAnimation.swift"
test -f "Gists_To_Try/ThreeWaysToAnimate.swift" \\
&& ok "Gists_To_Try/ThreeWaysToAnimate.swift" \\
|| miss "missing critical file: Gists_To_Try/ThreeWaysToAnimate.swift"
test -f "Gists_To_Try/AddToBookmark.swift" \\
&& ok "Gists_To_Try/AddToBookmark.swift" \\
|| miss "missing critical file: Gists_To_Try/AddToBookmark.swift"
# 5. Repo recency
days_since_last=$(( ( $(date +%s) - $(git log -1 --format=%at 2>/dev/null || echo 0) ) / 86400 ))
if [ "$days_since_last" -le 64 ]; then
ok "last commit was $days_since_last days ago (artifact saw ~34d)"
else
miss "last commit was $days_since_last days ago — artifact may be stale"
fi
echo
if [ "$fail" -eq 0 ]; then
echo "artifact verified (0 failures) — safe to trust"
else
echo "artifact has $fail stale claim(s) — regenerate at https://repopilot.app/r/amosgyamfi/open-swiftui-animations"
exit 1
fi
Each check prints ok: or FAIL:. The script exits non-zero if
anything failed, so it composes cleanly into agent loops
(./verify.sh || regenerate-and-retry).
⚡TL;DR
A curated Swift Package and Xcode project that provides copy-paste SwiftUI animation examples for iOS, macOS, visionOS, and watchOS—covering loading/progress, looping, spring, entrance/exit, fade, spin, and background effects without requiring external animation libraries. It demonstrates native SwiftUI primitives like PhaseAnimator, KeyframeAnimator, Symbol Effects, and Spring animations (iOS 17+) with runnable code in OpenSwiftUIAnimations.xcodeproj and shareable gists in Gists_To_Try/. Dual-structure project: OpenSwiftUIAnimations.xcodeproj is an Xcode app with individual View files demonstrating each animation type, while Gists_To_Try/ contains standalone Swift files for specific effects (e.g., AddToBookmark.swift, Gemini_25_With_OpenAI_o3_Animation.swift). GIF_Previews/ holds visual demos of each animation. No monorepo or package hierarchy—flat organization with thematic grouping by animation category.
👥Who it's for
iOS/macOS/visionOS developers who want production-ready SwiftUI animation patterns without framework dependencies—specifically junior engineers learning animation fundamentals and experienced devs seeking to avoid animation library bloat by building effects in-house.
🌱Maturity & risk
Actively maintained (as of 2025, integrating AI-generated animations via Gemini 2.5 Pro, Claude 3.7 Sonnet, OpenAI o3). The repo has substantial visual proof-of-concept GIFs in GIF_Previews/ and a growing gist collection, but lacks formal unit tests, CI/CD pipeline, or semantic versioning. It is stable example code rather than a versioned library—suitable for learning and reference, not production dependency.
Single-maintainer repo (@amosgyamfi) with no test coverage, no automated CI, and no formal issue tracking visible beyond a GitHub Projects backlog. Breaking changes to SwiftUI APIs (e.g., iOS 18 symbol effect deprecations) could silently break examples. No dependency management tool (no Package.swift or CocoaPods spec), so code must be copy-pasted rather than versioned.
Active areas of work
Active expansion in 2025 toward AI-assisted animation generation: recent additions include Gemini_25_With_OpenAI_o3_Animation.swift, Claude4SonnetSwiftUIFireworks.swift, and WWDC25Animation.swift. The repo is shifting from hand-authored examples to generative model outputs (Gemini 2.5 Pro, Claude 3.7 Sonnet, OpenAI o3/o4-mini).
🚀Get running
Clone the repo and open in Xcode: git clone https://github.com/amosgyamfi/open-swiftui-animations.git && cd open-swiftui-animations && open OpenSwiftUIAnimations.xcodeproj. Select a target (iOS 17+) in the scheme dropdown and build/run. No CocoaPods, SPM, or external package manager required.
Daily commands:
open OpenSwiftUIAnimations.xcodeproj in Xcode, select iOS 17+ simulator or device target, press Cmd+R to build and run. Or copy a .swift file from Gists_To_Try/ into your own SwiftUI project and adapt the View struct.
🗺️Map of the codebase
OpenSwiftUIAnimations.xcodeproj/project.pbxproj— Primary Xcode project configuration that defines all build targets, file references, and dependencies for the SwiftUI animations framework.OpenSwiftUIAnimations/AIThinkingAnimations/CombinedSymbolEffects.swift— Demonstrates modern SwiftUI symbol effects API usage, serving as a reference implementation for complex animation patterns.OpenSwiftUIAnimations/AnimatedIllustrations/MickeyMouseAnimation/MickeyMouseAnimation.swift— Complex multi-layer animation example showing composition of spring and keyframe animations, essential for understanding the repo's animation patterns.Gists_To_Try/ThreeWaysToAnimate.swift— Educational reference showing three distinct animation approaches (basic, PhaseAnimator, KeyframeAnimator) that forms the conceptual foundation of the repo.Gists_To_Try/AddToBookmark.swift— Practical example of interactive UI animation demonstrating state-driven animation patterns used throughout the codebase.OpenSwiftUIAnimations/AlertNotificationAnimation.swift— Core notification/alert animation pattern frequently referenced and extended in other animation examples.Gists_To_Try/WWDC25Animation.swift— Latest animation techniques showcase integrating new SwiftUI APIs like PhaseAnimator and Spring animations for iOS 18+.
🛠️How to make changes
Add a New Simple Animation
- Create new Swift file in OpenSwiftUIAnimations/ directory following naming convention (e.g., MyNewAnimation.swift) (
OpenSwiftUIAnimations/MyNewAnimation.swift) - Define a SwiftUI View struct with @State variables for animation triggers (
OpenSwiftUIAnimations/MyNewAnimation.swift) - Apply .animation() modifier with preferred timing (spring, linear, easeInOut) from Apple's SwiftUI documentation (
OpenSwiftUIAnimations/MyNewAnimation.swift) - Add preview with #Preview macro to test animation in Xcode canvas (
OpenSwiftUIAnimations/MyNewAnimation.swift)
Add a Complex Multi-Layer Animation (like Fireworks)
- Create new file in Gists_To_Try/ directory (reference pattern: Gists_To_Try/NewAnimationName.swift) (
Gists_To_Try/MyFireworkAnimation.swift) - Define data model for animation elements (e.g., struct Particle with position, velocity, lifetime properties) (
Gists_To_Try/MyFireworkAnimation.swift) - Use TimelineView with EveryFrame schedule for continuous animation updates (iOS 17+) or .onReceive(Timer) (
Gists_To_Try/MyFireworkAnimation.swift) - Compose particle Views using ForEach with offset(), rotation(), opacity() modifiers driven by animation state (
Gists_To_Try/MyFireworkAnimation.swift) - Add GIF preview by exporting animation and placing in GIF_Previews/ directory following repo naming (
GIF_Previews/myFireworkAnimation.gif)
Add a PhaseAnimator or KeyframeAnimator Pattern
- Reference Gists_To_Try/ThreeWaysToAnimate.swift or Gists_To_Try/WWDC25Animation.swift as template (
Gists_To_Try/ThreeWaysToAnimate.swift) - Create new animation file using PhaseAnimator (iOS 17+) wrapping View content with phase-driven state changes (
OpenSwiftUIAnimations/MyPhaseAnimation.swift) - Define animation phases enum matching trigger conditions (e.g., enum Phase { case initial, animating, complete }) (
OpenSwiftUIAnimations/MyPhaseAnimation.swift) - Use .phaseAnimator modifier with animation timing and phase transitions (
OpenSwiftUIAnimations/MyPhaseAnimation.swift)
Add Symbol Effects Animation (iOS 17+)
- Reference OpenSwiftUIAnimations/AIThinkingAnimations/CombinedSymbolEffects.swift for Symbol Effects API usage (
OpenSwiftUIAnimations/AIThinkingAnimations/CombinedSymbolEffects.swift) - Create new file with Image or Label containing SF Symbol asset (
OpenSwiftUIAnimations/MySymbolAnimation.swift) - Apply .symbolEffect() modifier with chosen effect (pulse, scale, rotate, appear, bounce, etc.) and isActive binding (
OpenSwiftUIAnimations/MySymbolAnimation.swift) - Chain multiple symbol effects using repeated .symbolEffect() calls for combined effects (
OpenSwiftUIAnimations/MySymbolAnimation.swift)
🔧Why these technologies
- SwiftUI (iOS 14+) — Native Apple framework with declarative syntax, built-in animation support, hot reload in previews, and tight integration with system animations
- PhaseAnimator (iOS 17+) — Modern phase-based animation API allowing structured multi-step animations with cleaner syntax than legacy withAnimation
- KeyframeAnimator (iOS 17+) — Enables precise frame-by-frame timing control for complex sequences without relying on third-party libraries
- Spring Animations (iOS 17+) — Native spring physics simulation providing more natural motion than traditional easing functions
- Symbol Effects (iOS 17+) — System-optimized effects for SF Symbols reducing custom animation code and ensuring consistency with Apple design language
- TimelineView (iOS 15+) — Efficient way to drive continuous animations without Timer overhead, better for real-time updates like particle systems
⚖️Trade-offs already made
- Pure SwiftUI
- Why: undefined
- Consequence: undefined
🪤Traps & gotchas
No hidden traps documented, but be aware: (1) All examples target iOS 17+ (PhaseAnimator is iOS 17-only); iOS 16 or earlier requires fallback animations; (2) Some gists are AI-generated and may have subtle SwiftUI API mismatches in edge cases—test before shipping; (3) No tests = manual verification only; copy-paste code directly into your project rather than treating as a dependency.
🏗️Architecture
💡Concepts to learn
- PhaseAnimator — PhaseAnimator is the iOS 17+ primitive for state-driven animations that drives most examples in this repo; understanding its phase sequencing and .animation modifiers is essential to adapting any example.
- KeyframeAnimator — Enables frame-by-frame granular control over complex animations (e.g., character flips, spinning objects) without external tweening libraries; multiple examples in this repo showcase it.
- Spring Animation Curves — SwiftUI 5.3+ Spring animations (.bouncy, .smooth, custom UnitPoint parameters) replace timing curves for natural, physics-like motion; this repo demonstrates spring parameter tuning extensively.
- Symbol Effects — iOS 17+ Symbol Effects (.scale, .bounce, .pulse, .wiggle) provide lightweight icon animations; this repo shows how to layer them without custom View code.
- ViewModifier & Custom Modifiers — Reusable animation modifiers (e.g., .glassEffect() in GlassEffectContainerMorphing) encapsulate animation logic; understanding this pattern is key to extending examples.
- Morphing & Shape Interpolation — Several examples (GlassEffectContainer, Liquid effects) morph between container shapes; this requires understanding how SwiftUI interpolates geometry and spacing in HStack/VStack phase changes.
- Generative AI-Assisted Code (Gemini, Claude, OpenAI APIs) — As of 2025, this repo includes animations generated by Gemini 2.5 Pro, Claude 3.7 Sonnet, and OpenAI o3; understanding that AI-generated animation code may require human refinement is critical for contributors.
🔗Related repos
airbnb/lottie-ios— Industry-standard JSON animation library that this repo explicitly avoids; Lottie users seeking native SwiftUI alternatives will find this repo as an inspirational lightweight alternative.apple/swift-docc— Apple's documentation compiler; relevant because this repo focuses on SwiftUI animations from official Apple Developer Documentation, and could benefit from DocC integration for structure.SwiftUIX/SwiftUIX— Comprehensive SwiftUI extensions library; overlaps on animation helpers but this repo takes a minimalist, copy-paste-friendly approach versus SwiftUIX's batteries-included design.pointfreeco/swift-composable-architecture— State management ecosystem; relevant because this repo's animations are stateless examples, but TCA users might integrate these patterns into their reducers.amosgyamfi/swiftui_tutorial_projects— Companion repo by same author containing extended SwiftUI tutorials and gists (mentioned in README as source for LiquidGlassEffectContainer gist).
🪄PR ideas
To work on one of these in Claude Code or Cursor, paste:
Implement the "<title>" PR idea from CLAUDE.md, working through the checklist as the task list.
Create a comprehensive animation catalog README with live preview links and categorization
The repo has 40+ GIF previews in GIF_Previews/ and numerous animation files in OpenSwiftUIAnimations/, but there's no organized index mapping each animation file to its corresponding GIF preview and category. This makes it hard for users to discover and understand what each animation does. A structured catalog would significantly improve discoverability and serve as better documentation.
- [ ] Create ANIMATION_CATALOG.md that categorizes all animations by type (loading, looping, spring, entrance, exit, etc.)
- [ ] Map each animation file in OpenSwiftUIAnimations/ to its corresponding GIF_Previews/*.gif
- [ ] For each animation, include: file path, GIF preview, brief description, and SwiftUI concepts used
- [ ] Link back to relevant Apple Developer Documentation references (like Phase Animator) for each category
- [ ] Add a table of contents and visual hierarchy to make the catalog easy to navigate
Extract reusable animation modifiers from Gists_To_Try/ into a structured Modifiers directory
The Gists_To_Try/ folder contains 11 standalone Swift files with complete animations, but they're not organized as reusable components. Many likely contain common patterns (fireworks, transitions, morphing) that could be extracted into parameterized modifier files (e.g., .fireworksEffect(), .morphingTransition()). This would make it easier for developers to copy-paste and compose animations.
- [ ] Create OpenSwiftUIAnimations/AnimationModifiers/ directory for reusable modifier extensions
- [ ] Analyze Gists_To_Try/*.swift files and extract 3-5 of the most common animation patterns
- [ ] Create modifier files like FireworksModifier.swift, MorphingModifier.swift, ParticleEffectModifier.swift
- [ ] Add usage examples and parameter documentation to each modifier
- [ ] Update the main README with a 'Quick Start' section showing how to apply these modifiers to any View
Add SwiftUI iOS/macOS/visionOS version compatibility matrix with availability attributes
The README mentions support for iOS, macOS, visionOS, and watchOS, but individual animation files lack @available attributes specifying minimum OS versions and which animations work on which platforms. This is critical since newer animations (like Phase Animator, Symbol Effects) require iOS 17.6+, visionOS 2.0+, etc. Contributors and users need clear guidance on compatibility.
- [ ] Audit all animation files in OpenSwiftUIAnimations/ and add @available() attributes based on API requirements
- [ ] Create COMPATIBILITY.md documenting minimum OS versions required for each animation type/feature
- [ ] Add conditional compilation flags (#if os(iOS) etc.) where platform-specific code exists
- [ ] Create a compatibility matrix table in README showing which animation categories work on which platforms
- [ ] For gists in Gists_To_Try/, add version comments at the top (e.g., '// Requires: iOS 17.6+, macOS 14.6+')
🌿Good first issues
- Add comprehensive test coverage for spring animation parameters in Gists_To_Try/ (e.g., .bouncy with varying extraBounce, .smooth with varying response/dampingFraction) to verify timings match Apple docs.
- Create a companion package manifest (Package.swift with .package(url:)) to allow adding this repo as an SPM dependency, so contributors can depend on versioned animation modules rather than copy-paste.
- Write a quick-start guide document (GettingStarted.md) showing how to adapt the GlassEffectContainerMorphing or WWDC25Animation examples into a template for custom animations, with before/after screenshots.
📝Recent commits
Click to expand
Recent commits
9db2c29— Revise support section in README.md (amosgyamfi)e7dc3cc— Update README with support and donation links (amosgyamfi)68f72e3— Add Safari-Style Add to Bookmarks Animation section (amosgyamfi)7c778c8— Add files via upload (amosgyamfi)34f925a— Create AddToBookmark SwiftUI view (amosgyamfi)997d518— Add files via upload (amosgyamfi)702374e— Update README with SwiftUI New Year's Eve Fireworks (amosgyamfi)dbedb86— Add files via upload (amosgyamfi)2bf3a3e— Add New Year's Eve Fireworks 2026 SwiftUI view (amosgyamfi)6f5a9e3— Add animated visual guide for SwiftUI masking and clipping (amosgyamfi)
🔒Security observations
This is a SwiftUI animation library repository with minimal security concerns. The codebase appears to contain only Swift animation code with no apparent injection vulnerabilities, hardcoded secrets, or infrastructure misconfiguration issues. Primary concerns are minor: untracked system files (.DS_Store, Xcode user data) that could be easily remediated through proper .gitignore configuration. The repository lacks formal dependency management declarations, which should be addressed if external packages are used. Overall security posture is solid for an open-source animation library with no backend services, authentication mechanisms, or data handling components.
- Low · Xcode User Data and Workspace Files Exposed —
OpenSwiftUIAnimations.xcodeproj/project.xcworkspace/xcuserdata/*. The repository contains Xcode user data files (.xcuserdatad directories) and workspace state files that may contain sensitive information about the development environment, including file paths, recently opened files, and user-specific configurations. These should not be committed to version control. Fix: Add .xcuserdatad, .xcworkspace/xcuserdata, and *.xcuserdatad to .gitignore. These are automatically generated and user-specific files that should not be version controlled. - Low · macOS System Files in Repository —
.DS_Store, GIF_Previews/.DS_Store. .DS_Store files are macOS system files that can contain metadata and should not be committed to version control. Their presence indicates incomplete .gitignore configuration. Fix: Add .DS_Store to .gitignore and remove existing instances using 'git rm --cached .DS_Store' and 'git rm --cached --recursive **/.DS_Store' - Low · No Package Dependencies Declared —
Repository root. No Package.swift or Podfile is present, making it difficult to track and audit third-party dependencies systematically. This limits the ability to detect known vulnerabilities in dependencies. Fix: If using Swift Package Manager, create a Package.swift file. If using CocoaPods, create a Podfile. This enables automated dependency vulnerability scanning.
LLM-derived; treat as a starting point, not a security audit.
👉Where to read next
- Open issues — current backlog
- Recent PRs — what's actively shipping
- Source on GitHub
Generated by RepoPilot. Verdict based on maintenance signals — see the live page for receipts. Re-run on a new commit to refresh.