SwiftUI Animations
April 26, 2026 · View on GitHub
SwiftUI Animations
A growing collection of polished SwiftUI animations, ready to drop into your iOS apps.
Overview
This repository contains 23+ custom SwiftUI animations and Metal shaders — from loaders and toggles to interactive UI components and GPU-powered visual effects — all built entirely with SwiftUI. Each animation lives in its own self-contained folder with all the source code you need to integrate it into your project.
Table of Contents
- Requirements
- Getting Started
- Animations Gallery
- Project Structure
- How to Run
- Contributing
- Contributors
- Author
- License
Requirements
| Dependency | Version |
|---|---|
| iOS | 17.0+ |
| Xcode | 16.0+ |
| Swift | 5.0+ |
Getting Started
# Clone the repository
git clone https://github.com/Shubham0812/SwiftUI-Animations.git
# Open in Xcode
cd SwiftUI-Animations
open SwiftUI-Animations.xcodeproj
Select a simulator and hit Run — each animation is accessible from the home screen.
Animations Gallery
|
Add to Cart
|
Chat Bar
|
Wi-Fi Signal
|
|
Loader
|
Add Item
|
Circle Loader
|
|
Pill Loader
|
Like Button
|
Submit Button
|
|
GitHub Octocat Loader
|
3D Rotating Loader
|
Animated Login
|
|
Book Loader
|
Card Viewer
|
Infinity Loader
|
|
Light Switch
|
Spinning Loader
|
Download Button
|
|
Triangle Loader
|
Octocat Wink
|
Yin-Yang Toggle |
|
Text Swirl |
Card Swap |
Scratch to Reveal |
Project Structure
SwiftUI-Animations/
├── Code/
│ ├── Common/
│ │ ├── Animations/ # Each animation in its own folder
│ │ │ ├── 3dLoader/
│ │ │ ├── AddView/
│ │ │ ├── Bank Card/
│ │ │ ├── BookLoader/
│ │ │ ├── Cards Swap/
│ │ │ ├── Cart/
│ │ │ ├── ChatBar/
│ │ │ ├── CircleLoader/
│ │ │ ├── DownloadButton/
│ │ │ ├── GithubLoader/
│ │ │ ├── InfinityLoader/
│ │ │ ├── LightSwitch/
│ │ │ ├── Like/
│ │ │ ├── Loader/
│ │ │ ├── Loader2/
│ │ │ ├── LoginView/
│ │ │ ├── Octocat-Wink/
│ │ │ ├── PillLoader/
│ │ │ ├── Scratch to Reveal/
│ │ │ ├── SpinningLoader/
│ │ │ ├── SubmitView/
│ │ │ ├── TextSwirl/
│ │ │ ├── TriangleLoader/
│ │ │ ├── Wifi/
│ │ │ └── YinYang-Toggle/
│ │ └── Shaders/ # Metal shader effects
│ │ └── Burn/ # Burn transition effect (.metal + .swift)
│ ├── Features/
│ │ ├── App/ # Root app views & coordinator
│ │ ├── Home/ # Home screen
│ │ │ ├── Models/ # Animation item models
│ │ │ └── Views/ # Home views & support views
│ │ ├── Shaders/ # Shader showcase views
│ │ └── Support Views/ # Shared feature UI components
│ ├── Navigation/ # Router & navigation logic
│ ├── Services/ # Haptic feedback manager
│ └── Utils/ # Colors, fonts & helpers
├── Assets/
│ └── Fonts/ # ClashGrotesk custom font family
├── GIFs/ # Animation preview GIFs
└── SwiftUI-Animations.xcodeproj
How to Run
-
Clone & open
git clone https://github.com/Shubham0812/SwiftUI-Animations.git cd SwiftUI-Animations open SwiftUI-Animations.xcodeproj -
Select a target — choose any iOS simulator (iPhone 14 or later recommended) from the device picker in the Xcode toolbar.
-
Build & run — press ⌘ R or click the Run button. The app launches on the home screen listing all available animations.
-
Browse an animation — tap any card to open it full-screen and interact with it directly.
-
Jump to the source — each animation lives in its own self-contained folder under
Code/Common/Animations/. Shader effects are underCode/Common/Shaders/. Open any folder in Xcode's Project Navigator to read or copy the code.
Tip: Every view file includes a
PreviewProvider/#Preview, so you can also run individual animations directly in Xcode Previews without launching the full app — just open the file and press ⌘ ⌥ P.
Contributing
Contributions are welcome! Whether it's a new animation, a bug fix, or an improvement to an existing one, feel free to open a pull request.
Please read the Contributing Guide for detailed instructions on how to get started, code style guidelines, and the pull request process.
| Resource | Description |
|---|---|
| Contributing Guide | How to contribute, code style, PR process |
| Code of Conduct | Community standards and expectations |
| Security Policy | How to report vulnerabilities |
| Changelog | History of changes and new animations |
Contributors
Thanks to everyone who has helped make this project better!
| Avatar | Name | GitHub |
|---|---|---|
![]() | Shubham Kumar Singh | @Shubham0812 |
Want to see your name here? Check out the Contributing Guide and the full Contributors List.
Author
Shubham Kumar Singh
iOS Developer | SwiftUI / UIKit | Indie Developer | Open Source Contributor
License
This project is licensed under the Apache License 2.0 — see the LICENSE file for details.
You are free to use, modify, and distribute this project in your own apps — commercial or personal.
Support This Project
If you found this project helpful or learned something from the source code, please consider:
Give it a Star — It helps others discover the project!
Share it with your friends and colleagues — Let's grow the SwiftUI community together!
Made with SwiftUI and lots of creativity