All SeamComponents (e.g., SeamAccessView, SeamKeyCardView, SeamCredentialsView, SeamUnlockCardView) automatically read the theme from EnvironmentValues.seamTheme.
How theming works
- Environment-driven: Inject a SeamTheme anywhere in your view hierarchy:
- Defaults provided: If you don’t inject a theme, components use SeamTheme.default.
- Partial overrides: Every nested palette supports .with(…) so you can change a few fields without redefining everything.
Quick start
App-wide theme (recommended)
Inject a theme at the root so all Seam components share a consistent look:Local override
Scope a different look to a subsection of your UI:Theme structure
SeamTheme groups styling into five nested palettes. Each has:- A default value that matches iOS look & feel.
- A memberwise initializer (for full control).
- A with(…) builder to override specific fields.
Composing a theme
Use the top-level SeamTheme.with(…) to swap in any subset of palettes:Dark mode
- The defaults are light/dark adaptive by relying on system colors (e.g., Color(UIColor.systemBackground), .primary, .secondary).
- When customizing, prefer dynamic colors or provide your own light/dark logic:
Best practices
- Start with defaults, then override selectively with .with(…).
- Keep contrast high for accessibility; test in light and dark modes.
- Brand consistently by driving accent, key button gradient, and toast accent from the same hue family.
- Scope locally if a one-off component needs a different visual treatment.
API reference at a glance
- SeamTheme.default — system-aligned theme
- EnvironmentValues.seamTheme — environment key for theming
- Builders:
- SeamTheme.with(colors:fonts:keyCard:toast:unlockCard:)
- SeamTheme.Colors.default.with(…)
- SeamTheme.Fonts.default.with(…)
- SeamTheme.KeyCard.default.with(…)
- SeamTheme.Toast.default.with(…)
- SeamTheme.UnlockCard.default.with(…)

