A SwiftUI and UIKit library for creating Instagram-like animated gradient backgrounds, text, and views in iOS apps.
Pastel is an iOS library that enables developers to easily add animated gradient effects to their apps, mimicking the smooth gradient animations popularized by Instagram. It provides a simple API for applying gradients to backgrounds, text, and views in both SwiftUI and UIKit. The library solves the problem of implementing complex gradient animations with minimal code, enhancing UI visual appeal.
iOS developers building apps with SwiftUI or UIKit who want to add polished, animated gradient effects to improve user interface aesthetics. It's particularly useful for those creating social, media, or design-focused applications.
Developers choose Pastel for its ease of use, extensive preset gradients, and seamless integration with both SwiftUI and UIKit. Its unique selling point is the shared animation state, allowing synchronized gradients across multiple UI elements with minimal setup.
🎨 Gradient animation effect like Instagram
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Offers 30 built-in gradients like .instagram and .sunset for instant implementation without custom color selection, as shown in the README with examples like .pastelBackground(.instagram).
Seamlessly integrates with both SwiftUI modifiers and UIKit views, demonstrated by .pastelBackground in SwiftUI and PastelView in UIKit for flexible usage across codebases.
Enables synchronized gradients across multiple UI elements using PastelAnimationState, simplifying coordinated effects like matching backgrounds and text with minimal setup.
Provides a declarative API that adds animated gradients with just a few lines, such as Text("Hello").pastelBackground(.instagram) for quick prototyping and implementation.
Requires iOS 16.0 or higher, excluding support for apps that need to run on older iOS versions, which is a significant barrier for legacy projects.
Focuses on color and duration animations but lacks advanced features like gradient stop positioning or complex interpolation controls available in native Core Animation or SwiftUI.
Adds an external library dependency for effects that could be implemented natively, potentially increasing project complexity and maintenance for simple gradient needs.