From themekit
Provides tokenized SwiftUI components (Badge, Card, TextInput, etc.) and runtime theming with design tokens, theme presets, and chainable modifiers for building themed interfaces.
How this skill is triggered — by the user, by Claude, or both
Slash command
/themekit:themekitThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
A token-driven, brand-neutral **SwiftUI** component library. Every color,
A token-driven, brand-neutral SwiftUI component library. Every color,
radius, spacing, type style and shadow is a design token resolved at runtime
from the active Theme. Write UI with its components + modifiers; the theme
re-skins everything.
For the full component list + each one's init params + modifiers, read
references/components.md. For the theme-preset
catalog, read references/themes.md.
.foregroundStyle(.blue), no Color(hex:) in
app code. Pull from the theme: theme.text(.textPrimary),
theme.background(.bgWhite), or a SemanticColor (SemanticColor.primary.base).@Environment(\.theme) private var theme.
It defaults to Theme.shared..environment(Theme.shared).init; variants, sizes, flags, colors and
callbacks are modifiers — e.g. Badge("New").badgeStyle(.info).badgeShape(.rounded)..controlSize(.small) (not a size: arg).
Disabled state is native: .disabled(_:) (not an isEnabled: arg).import ThemeKit
@main
struct MyApp: App {
var body: some Scene {
WindowGroup {
ContentView().environment(Theme.shared) // inject the theme once
}
}
}
struct ContentView: View {
@Environment(\.theme) private var theme
var body: some View {
VStack(spacing: Theme.SpacingKey.md.value) {
Text("Hello").foregroundStyle(theme.text(.textPrimary))
PrimaryButton("Continue") { /* … */ }.fullWidth()
}
.padding(Theme.SpacingKey.lg.value)
.background(theme.background(.bgWhite))
}
}
theme.text(.textPrimary | .textSecondary | .textTertiary | .textDisabled | .textHero)theme.background(.bgWhite | .bgElevatorPrimary | .bgSecondary | .bgHero | …) — default component surface is .bgWhite (base-100)theme.border(.borderPrimary | .borderHero | …)theme.foreground(.fgHero | .fgSecondary | …)SemanticColor): .primary .secondary .accent .neutral .info .success .warning .error + hues. Each gives .solid .soft .accent .border
variants and a 50..900 ladder (.base .hover .active .strong .bg …). Use with
FillVariant (.solid .soft .outline .ghost) on the configurable components.Theme.RadiusRole.box.value (cards/modals), .field.value (buttons/inputs),
.selector.value (checkboxes/badges). Size ramp also exists:
Theme.RadiusKey.sm.value etc.Theme.SpacingKey.xs|sm|md|base|lg|xl.value.textStyle(.headingSm | .bodyBase400 | .labelMd600 | …) (a view modifier).Browse references/components.md for all of them.
The configurable ones take a SemanticColor + FillVariant, so brand/accent
recolor for free:
Badge("Sale").badgeStyle(.error).variant(.solid)
Chip("Pool", isSelected: $on).icon("drop.fill")
ThemeButton("Save") { save() }.color(.accent).variant(.solid)
TextInput("Email", text: $email).icon(leading: "envelope")
.a11yID("login.email")
Select("Country", options: countries, selection: $country) { $0.name }
Checkbox("I agree", isChecked: $agree).controlSize(.small)
Card(title: "Booking") { /* content */ }
Rating(value: 4.5).allowHalf().onRate { rating = $0 }
ProgressBar(value: 0.6).showsPercentage().gradient()
// Recolor the whole app from one accent (generates the full palette on-device):
Theme.shared.applyGenerated(primaryHex: "7C3AED")
// Or a full config (accent + base surface + secondary/accent brand colors):
Theme.shared.apply(ThemeConfig(primaryHex: "ff79c6", baseHex: "282a36",
secondaryHex: "bd93f9", accentHex: "ffb86c", dark: true))
// Inject a theme into ONE subtree only:
let ocean = Theme(); ocean.applyGenerated(primaryHex: "0fb4ab")
BookingCard().theme(ocean)
ThemeKit bundles 33 theme presets (inspired by daisyUI). Apply one, or drop the ThemePicker
grid into a screen:
ThemePreset.named("dracula")?.apply() // recolor Theme.shared live
@State private var active: String? = "cupcake"
ThemePicker(selection: $active) // tappable grid of all 33 themes
Themed form
@Environment(\.theme) private var theme
Card(title: "Sign up") {
VStack(spacing: Theme.SpacingKey.md.value) {
TextInput("Email", text: $email).icon(leading: "envelope").a11yID("email")
TextInput("Password", text: $pw, isSecure: true).a11yID("pw")
Checkbox("Accept terms", isChecked: $terms)
PrimaryButton("Create account") { submit() }.fullWidth().disabled(!terms)
}
}
Theme switcher screen — see ThemePicker + the theme-presets section above.
.foregroundStyle(.blue) / Color(hex:) in app UI → ✅ a theme token.Badge("x", size: .small) → ✅ Badge("x").size(.small) (size/variant/style
are modifiers now — check references/components.md for each component's set).SomeControl(isEnabled: false) → ✅ SomeControl().disabled(true).cornerRadius: 12 → ✅ Theme.RadiusRole.box.value.npx claudepluginhub isamercan/themekit --plugin themekitCustomizes gluestack-ui themes and design tokens including theme provider setup, dark mode support, NativeWind integration, and theme extensions for React and React Native UIs.
Builds or refactors iOS design system infrastructure for SwiftUI (iOS 26/Swift 6.2): tokens, colors, typography, spacing, component styles, asset governance, theming. Enforces @Equatable and modular MVVM-C boundaries.
Designs token-based theming systems for multi-brand design systems supporting light/dark/high-contrast modes, density variants, and runtime switching.