{"id":28394836,"url":"https://github.com/charlyk/swift-theme-kit","last_synced_at":"2025-06-27T00:31:14.668Z","repository":{"id":293656563,"uuid":"983031208","full_name":"Charlyk/swift-theme-kit","owner":"Charlyk","description":"SwiftThemeKit is a powerful and flexible design system framework for SwiftUI that enables you to create consistent, themeable user interfaces with ease. It provides a comprehensive set of components and utilities that follow modern design principles while maintaining full customizability.","archived":false,"fork":false,"pushed_at":"2025-06-14T08:37:47.000Z","size":15272,"stargazers_count":36,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-14T09:28:14.724Z","etag":null,"topics":["ios","ios-app","ios-swift","macos","macos-app","swift","swiftui","theme-switcher","themes","theming","theming-library"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Charlyk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-13T19:13:35.000Z","updated_at":"2025-05-28T06:28:05.000Z","dependencies_parsed_at":"2025-05-16T13:32:12.772Z","dependency_job_id":"14c0830c-6a5d-44db-a996-3618e6541a27","html_url":"https://github.com/Charlyk/swift-theme-kit","commit_stats":null,"previous_names":["charlyk/swift-theme-kit"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/Charlyk/swift-theme-kit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Charlyk%2Fswift-theme-kit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Charlyk%2Fswift-theme-kit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Charlyk%2Fswift-theme-kit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Charlyk%2Fswift-theme-kit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Charlyk","download_url":"https://codeload.github.com/Charlyk/swift-theme-kit/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Charlyk%2Fswift-theme-kit/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262166140,"owners_count":23268989,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ios","ios-app","ios-swift","macos","macos-app","swift","swiftui","theme-switcher","themes","theming","theming-library"],"created_at":"2025-05-31T19:00:53.104Z","updated_at":"2025-06-27T00:31:14.656Z","avatar_url":"https://github.com/Charlyk.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"![logo](logo.png)\n\n# SwiftThemeKit\n\n**A modern, token-driven design system framework for SwiftUI**  \nEasily create consistent, themeable user interfaces with full customization power — powered by a scalable design token system and environment-based styling.\n\n[![SwiftPM](https://img.shields.io/badge/SwiftPM-Compatible-blue)]()\n[![iOS](https://img.shields.io/badge/iOS-14.0%2B-lightgrey)]()\n[![Version](https://img.shields.io/github/v/tag/Charlyk/swift-theme-kit?label=Version)]()\n[![License](https://img.shields.io/badge/License-MIT-yellow)]()\n\n\u003ca href=\"https://www.producthunt.com/products/swiftthemekit?embed=true\u0026utm_source=badge-featured\u0026utm_medium=badge\u0026utm_source=badge-swiftthemekit\" target=\"_blank\"\u003e\u003cimg src=\"https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=979799\u0026theme=light\u0026t=1750157106036\" alt=\"SwiftThemeKit - A\u0026#0032;modern\u0026#0044;\u0026#0032;token\u0026#0045;driven\u0026#0032;design\u0026#0032;system\u0026#0032;framework\u0026#0032;for\u0026#0032;SwiftUI | Product Hunt\" style=\"width: 250px; height: 54px;\" width=\"250\" height=\"54\" /\u003e\u003c/a\u003e\n\n\u003cdiv style=\"display: flex; flex-wrap: wrap; gap: 12px;\"\u003e\n  \u003cimg src=\"skdemo.gif\" alt=\"Demo app animation\" width=\"300\"/\u003e\n\u003c/div\u003e\n\n---\n\n## Theme builder [WIP]\n\n[SwiftThemeKit.com](https://swiftthemekit.com)\n\n## ✨ Why SwiftThemeKit?\n\nSwiftUI offers flexibility, but theming across an entire app is hard to scale. SwiftThemeKit solves this by:\n\n- 🔄 Applying themes globally using `@Environment`\n- 🧱 Using design tokens (color, spacing, typography, shape, etc.)\n- 🔧 Letting you override *just what you need*—no subclassing or brittle modifiers\n- 🧪 Supporting previewing themes and snapshot testing\n\n---\n\n## 🔧 Features\n\n- 🎨 Complete light \u0026 dark theming system with token override support\n- 🧩 Drop-in UI components: `Button`, `TextField`, `Checkbox`, `Card`, `RadioGroup`, etc.\n- 💡 Declarative `.applyTheme*Style()` modifiers for composability\n- ♿️ Built with accessibility and contrast in mind\n- 🔌 Plug-and-play: just add `ThemeProvider` and you're ready\n\n---\n\n## 🚀 Quick Start\n\n1. **Wrap your root view with `ThemeProvider`:**\n\n```swift\n@main\nstruct MyApp: App {\n    var body: some Scene {\n        WindowGroup {\n            ThemeProvider {\n                ContentView()\n            }\n        }\n    }\n}\n```\n\n2. **Use themed components:**\n\n```swift\nstruct ContentView: View {\n    @State private var isEnabled = false\n    @State private var username = \"\"\n\n    var body: some View {\n        VStack {\n            Button(\"Primary Button\") { }\n                .applyThemeButtonStyle()\n\n            Checkbox(isChecked: $isEnabled, label: \"Enable Feature\")\n\n            TextField(\"Username\", text: $username)\n                .applyThemeTextFieldStyle()\n        }\n    }\n}\n```\n\n---\n\n## 🎨 Design Tokens\n\nSwiftThemeKit uses a modular token-based system:\n\n### 🖌 Color Tokens\n- `primary`, `secondary`, `error`, `background`, `surface`\n- On-color variants: `onPrimary`, `onError`, etc.\n\n### 🔤 Typography\n- Display, headline, body, label, button fonts\n- Font sizes, weights, line spacing\n\n### 📏 Spacing \u0026 Shape\n- Spacing: `xs`, `sm`, `md`, `lg`, `xl`, `xxl`\n- Radius: corner tokens (`sm`, `md`, `lg`)\n- Shadow elevations: `level1`, `level2`, `none`\n\n---\n\n## 🧩 Core Components\n\n### ✅ Buttons\n- Variants: `.filled`, `.tonal`, `.outlined`, `.elevated`, `.text`\n- Role support (e.g., `.destructive` uses error color tokens)\n\n### ✅ Inputs\n- `TextField`: outlined, filled, underlined\n- `Checkbox`, `RadioButton`, `RadioGroup`\n\n### ✅ Card\n- Customizable padding, elevation, background\n- Shadow and shape tokens applied via environment\n\n---\n\n## 🛠 Customizing Themes\n\nYou can create your own themes using token structs:\n\n```swift\nlet customTheme = Theme(\n    colors: .customColors,\n    typography: .customTypography,\n    spacing: .customSpacing,\n    shapes: .customShapes\n)\n```\n\nOr override parts of the environment:\n\n```swift\nMyView()\n    .font(.headlineMedium)\n    .padding(.xl)\n    .clipShape(.rounded)\n```\n\n---\n\n## 📦 Installation\n\nUse [Swift Package Manager](https://swift.org/package-manager/) and select the latest release:\n\n```swift\ndependencies: [\n  .package(url: \"https://github.com/Charlyk/swift-theme-kit.git\", from: \"\u003clatest_version\u003e\")\n]\n```\n\n---\n\n## 🧪 Screenshots\n\nClick to view full-size previews from snapshot tests:\n\n- [Typography](DemoApp/SwiftThemeKitDemo/SwiftThemeKitDemoTests/__Snapshots__/SwiftThemeKitDemoTests/testExampleViewSnapshot.TypographyView.png)\n- [Buttons](DemoApp/SwiftThemeKitDemo/SwiftThemeKitDemoTests/__Snapshots__/SwiftThemeKitDemoTests/testExampleViewSnapshot.ButtonsView.png)\n- [Cards](DemoApp/SwiftThemeKitDemo/SwiftThemeKitDemoTests/__Snapshots__/SwiftThemeKitDemoTests/testExampleViewSnapshot.ShapesView.png)\n- [Checkboxes](DemoApp/SwiftThemeKitDemo/SwiftThemeKitDemoTests/__Snapshots__/SwiftThemeKitDemoTests/testExampleViewSnapshot.CheckboxesView.png)\n\n---\n\n## 🧠 Best Practices\n\n- Prefer `.applyTheme*Style()` over custom modifiers\n- Use semantic tokens (e.g., `themeColor.primary`) instead of raw colors\n- Override per-view styles using `View.theme*()` modifiers\n- Preview multiple themes using SwiftUI `ForEach`\n\n---\n\n## 📋 Requirements\n\n- iOS 14+, macOS 11+, tvOS 15+, watchOS 7+\n- Swift 5.5+\n\n---\n\n## 🤝 Contributing\n\nWe welcome issues and PRs!  \nCheck the [CONTRIBUTING.md](CONTRIBUTING.md) for setup and guidelines.\n\n---\n\n## 📄 License\n\nMIT. See [LICENSE](LICENCE) for details.\n\n---\n\n## 🔍 Keywords\n\n`swift`, `swiftui`, `design-system`, `ui-kit`, `dark-mode`, `theme`, `component-library`, `design-token`, `sdk`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcharlyk%2Fswift-theme-kit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcharlyk%2Fswift-theme-kit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcharlyk%2Fswift-theme-kit/lists"}