A collaborative collection of beautiful, reusable SwiftUI designs, animations, and visual effects. This library serves as a showcase and resource for developers looking to enhance their apps with stunning UI components.
SwiftUI Open Design Library is a growing collection of beautiful UI designs, animations, and visual effects implemented in SwiftUI. The goal is to create a community-driven repository of reusable components that developers can easily incorporate into their own projects.
Each design in this library is:
- Self-contained - Can be used independently
- Customizable - Designed with parameters that can be adjusted
- Well-documented - Includes explanations of how it works
- Beginner-friendly - Includes comments to help new SwiftUI developers understand the implementation
- iOS 16.0+ / macOS 13.0+
- Swift 5.9+
- Xcode 15.0+
- Clone the repository:
git clone https://github.com/yourusername/swiftUI-opendesign.git
- Open the project in Xcode:
cd swiftUI-opendesign
open swiftUI-opendesign.xcodeproj
- Build and run the project to see the design showcase.
Each component is designed to be easily copied into your own projects. Simply:
- Copy the relevant Swift files into your project
- Import any required resources (shaders, assets, etc.)
- Use the component in your SwiftUI views
For example, to use the Noisy Gradient:
Copy folder "NoisyGradient Design" especially the extensions Read the original view to get an idea of how it's functioning Use the extensions of view model logic relevant to you
import SwiftUI
struct MyView: View {
var body: some View {
ZStack {
// Apply the noisy purple-teal gradient
LinearGradient.noisyPurpleTeal()
.edgesIgnoringSafeArea(.all)
// Your content here
Text("Hello, World!")
.foregroundColor(.white)
}
}
}
Contributions are welcome and encouraged! If you have a cool design, animation, or visual effect you'd like to share:
- Fork the repository
- Create a new branch for your design
- Add your design in a NEW directory
- Create a new directory with all relevant subfolders
- Include all necessary files (Swift, Metal shaders, etc.)
- Document your design:
- Add comments explaining how the design works
- Include any parameters that can be customized
- Explain any dependencies or requirements
- Make it beginner friendly
- Submit a pull request with a description of your design in as much detail as possible
You are welcome to change someone else contribution BUT your PR will not be accepted if it changes the actual Design itself.
- Fork the repository
- Create a new branch with a relative name e.g. NoisyGradient logic fix
- Fix the bugs or issues in the directory
- Change the logic for better handling
- Fix any bugs
- Document your changes:
- Add comments explaining how the fixes work
- Include any parameters that can be customized
- Explain any dependencies or requirements
- Make it beginner friendly
- Submit a pull request with a description of your changes in as much detail as possible
When contributing, please:
- Update the bottom of this README.md with acknowledgements if you have used other creators code
- Ensure your code is well-commented and follows good design practices
- Include a preview image or GIF of your design if possible
- Explain the use case or inspiration for your design
- Mention any performance considerations or limitations
- If using third-party code or resources, ensure proper attribution
Each design should follow this structure:
- Main View File: The SwiftUI view that implements the design
- Supporting Files: Any additional files needed (view models, extensions, etc.)
- README.md: A detailed explanation of the design with usage examples
For those new to SwiftUI or looking to improve their skills:
This project is available under the MIT License. See the LICENSE file for more information.
- Special thanks to all contributors who share their designs
- Some shader code adapted from Inferno by Paul Hudson
Made with ❤️ by the SwiftUI community