A protocol-oriented Swift library for dynamic theme management across iOS, macOS, tvOS, and watchOS.
Themes is a Swift library for managing dynamic themes in Apple platform apps (iOS, macOS, tvOS, watchOS). It solves the problem of hard-coded UI values by allowing developers to define themes as structured data, switch between them at runtime, and update views in real-time. Themes can be initialized from JSON, enabling dynamic theming from backend sources.
Swift developers building apps for Apple platforms (iOS, macOS, tvOS, watchOS) who need to support multiple themes, dark mode, or dynamic styling.
Developers choose Themes for its protocol-oriented design, which avoids replicating UIKit APIs and provides full control over theme properties. It centralizes theme definitions, supports real-time updates, and works across all Apple platforms.
👕👚 Theme management in Swift
Works across iOS, macOS, tvOS, and watchOS, enabling consistent theming on all Apple devices without platform-specific code, as highlighted in the features list.
UI components automatically react to theme changes via the use() function, eliminating manual tracking and allowing instant visual feedback, demonstrated in the demo GIFs.
Supports initializing themes from JSON, enabling backend-driven theme configurations for dynamic skinning, as shown in the usage example with let unicornTheme = MyTheme(json).
Uses Swift protocols to define custom themes with any properties, avoiding UIKit API replication and giving developers full control over design tokens, per the philosophy section.
Primarily targets UIKit with examples using UIColor and UIFont, lacking built-in support or documentation for SwiftUI's native theming systems, which may require additional adaptation.
Developers must explicitly call the use() function in each view to react to theme changes, leading to boilerplate code and potential maintenance overhead in large codebases.
Doesn't include pre-defined themes or design tokens, requiring teams to create all styling from scratch, which increases initial setup time compared to libraries with ready-made options.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.