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.
★ 5,693⑂ 296👁 109⑃ 3● 20▤ 0
+0
Daily
5,693
stars
296
forks
109
watchers
3
prs
20
issues
0
releases
README
Open SwiftUI Animations
Pure SwiftUI animation inspirations for your next iOS, macOS, visionOS, and watchOS projects. Enjoy 😊.
Support
- https://github.com/sponsors/amosgyamfi
- https://buymeacoffee.com/amosgyamfi
- https://ko-fi.com/amosgyamfi
Animate Anything With SwiftUI
!SwiftUI animations preview
SwiftUI animation is compelling and superb. With minimal effort, you can add incredible effects and beautiful animations to your apps. Why use an animation library instead of creating these tiny effects yourself? Get inspiration from here and start building your SwiftUI animations today. Most animations here are based on the animations section in the Apple Developer Documentation. Check out the Xcode project for examples of the new Phase Animator, Symbol Effects, Keyframe Animator, and Spring Animations for iOS 17 and beyond. Would you like to see an animation that is not here, or did you find an engaging one to add? Contact me on X: @amos_gyamfi or add it as a task in the project's backlog.
Starting in 2025, I will generate some of the SwiftUI animations using SOTA models like Gemini 2.5 Pro, Claude 3.7 Sonnet, OpenAI o3, and o4-mini models.
---
Liquid Glass Shape Morphing Animation With GlassEffectContainer: Gist
!Shape Morphing Animation With GlassEffectContainer
swift
import SwiftUI
struct LiquidGlassEffectContainer: View {
var body: some View {
GlassEffectContainer(spacing: 50) {
PhaseAnimator([false, true]) { morph in
HStack(spacing: morph ? 50.0 : -15.0) {
Button {
//
} label: {
Image(systemName: "scribble.variable")
}
.padding()
.glassEffect()
Button {
//
} label: {
Image(systemName: "eraser.fill")
}
.padding()
.glassEffect()
}
.tint(.green)
.font(.system(size: 64.0))
} animation: { morph in
//.bouncy(duration: 2, extraBounce: 0.5)
//.easeOut(duration: 2)
.easeInOut(duration: 2)
//.timingCurve(0.68, -0.6, 0.32, 1.6, duration: 2)
}
}
}
}
Preview {
LiquidGlassEffectContainer()
.preferredColorScheme(.dark)
}
---
Typewriting, Erasing & Cursor-Blinking-Style Animation: Gist
!Safari-Style Add to Bookmarks Animation
Safari-Style Add to Bookmarks Animation: Gist
!Safari-Style Add to Bookmarks Animation
---
Animated, visual guide to SwiftUI mask(alignment:_:), clipShape(_:style:), and clipped(antialiased:): Gist
!Animated, visual guide to SwiftUI mask(alignment:_:), clipShape(_:style:), and clipped(antialiased:)
---
2D rotation around specified anchor: Gist
!2D rotation around sTop issues
#1Could you add a license?5 comments · 2020-02-25#3how do you use this library then?1 comments · 2021-02-07#23Why there is no SignatureView available?0 comments · 2024-05-23#22YouTube like and subscribe animation0 comments · 2024-02-24#21Pinch to zoom (using symbol alignment)0 comments · 2024-01-29#20Tinder-style card swiping with spring animation0 comments · 2024-01-28#19YouTube subscribe button0 comments · 2024-01-28#18Threads loading animation0 comments · 2024-01-16