SwiftUI Animations

April 26, 2026 · View on GitHub

SwiftUI Animations

A growing collection of polished SwiftUI animations, ready to drop into your iOS apps.

Swift SwiftUI Platform License Build

GitHub stars GitHub forks GitHub followers


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

DependencyVersion
iOS17.0+
Xcode16.0+
Swift5.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.

Add to Cart

View Code

Chat Bar

View Code

Wi-Fi Signal

View Code

Loader

View Code

Add Item

View Code

Circle Loader

View Code

Pill Loader

View Code

Like Button

View Code

Submit Button

View Code

GitHub Octocat Loader

View Code

3D Rotating Loader

View Code

Animated Login

View Code

Book Loader

View Code

Card Viewer

View Code

Infinity Loader

View Code

Light Switch

View Code

Spinning Loader

View Code

Download Button

View Code

Triangle Loader

View Code

Octocat Wink

View Code

Yin-Yang Toggle

View Code

Text Swirl

View Code

Card Swap

View Code

Scratch to Reveal

View Code

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

  1. Clone & open

    git clone https://github.com/Shubham0812/SwiftUI-Animations.git
    cd SwiftUI-Animations
    open SwiftUI-Animations.xcodeproj
    
  2. Select a target — choose any iOS simulator (iPhone 14 or later recommended) from the device picker in the Xcode toolbar.

  3. Build & run — press ⌘ R or click the Run button. The app launches on the home screen listing all available animations.

  4. Browse an animation — tap any card to open it full-screen and interact with it directly.

  5. Jump to the source — each animation lives in its own self-contained folder under Code/Common/Animations/. Shader effects are under Code/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.

ResourceDescription
Contributing GuideHow to contribute, code style, PR process
Code of ConductCommunity standards and expectations
Security PolicyHow to report vulnerabilities
ChangelogHistory of changes and new animations

Contributors

Thanks to everyone who has helped make this project better!

AvatarNameGitHub
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

Instagram LinkedIn GitHub


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!

GitHub stars GitHub forks

Share it with your friends and colleagues — Let's grow the SwiftUI community together!

Share on X Share on LinkedIn Share on Reddit


Made with SwiftUI and lots of creativity