Skip to main content
Full technical details in your project at /docs/modules/DesignSystem.md

What You Get

  • Token system - Colors, spacing, typography, radius (never hardcode values)
  • 5 themes - System, Light, Dark, Aurora, Obsidian
  • Liquid Glass primitive - SAIGlass with iOS 26 glass and iOS 17–25 Material fallback (new in v2.0)
  • Premium components - Buttons, inputs, cards, bubbles
  • BrandConfig - Single place to customize app identity
  • Accessibility - Dynamic Type, VoiceOver, Reduce Motion
  • Gradients & motion - Premium visual effects
Time saved: 20-32 hours of design system, theming infrastructure, component library, and testing.

Liquid Glass

v2.0 introduces SAIGlass, a Liquid Glass primitive that uses the iOS 26 Glass material on iOS 26+ and falls back to SwiftUI Material on iOS 17–25. Same call sites, progressive enhancement at runtime. Location: Packages/DesignSystem/Sources/DesignSystem/Materials/SAIGlass.swift

SAIGlassStyle

The .saiGlass modifier

One-call glass treatment for any view:

SAIGlassContainer

Use when multiple glass surfaces sit near each other so they sample the same background instead of stacking visually:

SAITabBarMinimizeStyle

Fighting glass? Stop. Do not pile .background(DSColors.background) or DSColors.background.ignoresSafeArea() onto SwiftUI containers. They block the Material SwiftUI already provides and wreck Liquid Glass on iOS 26. See the Migration Guide for cleanup steps.

BrandConfig (Customize Your App)

Single file to customize app identity. From BrandConfig.swift:
To rebrand:
  1. Change appDisplayName → Your app name
  2. Update the AccentPrimary color set in Resources/Assets.xcassets
  3. Change avatarFallbackSymbol → Your SF Symbol
  4. Set the legal URL strings to your live HTTPS pages before shipping
  5. Entire app updates automatically
The // generator:brand markers are stable anchors for the App Generator’s identity transforms — a separate product (coming soon). Keep one declaration per line and do not remove the markers. They are inert in the boilerplate itself.

Design Tokens (Production System)

DSColors - Theme-Aware

Every color adapts to the active theme:
Token categories:
  • Text: textPrimary, textSecondary
  • Surfaces: background, surface, surfaceElevated
  • Accents: accentPrimary, accentSecondary
  • Borders: borderHairline, borderSubtle
  • Semantic: success, warning, danger

DSSpacing

Consistent spacing scale:

DSTypography

Text styles with Dynamic Type:

DSRadius

Corner radius values:

UI Components

Theme System

5 Built-in Themes

System

Follows iOS light/dark mode

Light

Always light appearance

Dark

Always dark appearance

Aurora

Premium light — warm cream with coral/peach accents

Obsidian

Premium dark — deep navy with electric cyan accents

Applying Themes

From Settings, persist and apply a theme in one call (SettingsDTO.Theme):
ThemeManager (in the Core package) owns the live theme and is also reachable directly:

How It Works

Customization Examples

Create Custom Theme

1

Add Color Set

In Resources/Assets.xcassets, add a color set per token you want to override (e.g. AccentPrimary, Background). Themed values can also be returned in code (see step 3).
2

Add Theme Cases

Add case myTheme to both theme enums — the persisted SettingsDTO.Theme (Packages/Storage/.../SettingsDTO.swift) and the live ThemeManager.Theme (Packages/Core/Sources/Core/Theme/ThemeManager.swift). Then add the .myTheme branch to the mapping in SettingsViewModel.setTheme(_:), and add a matching case to DSColors.ThemePalette + DSColors.setTheme(_:colorScheme:).
3

Map Colors

In DSColors.swift, branch on activeTheme:
4

Surface in the Picker

The settings appearance picker iterates SettingsDTO.Theme.allCases, so the new case appears automatically once the cases above are wired up.

Create Custom Component

Animations

Standard motion timings live in SAIMotion and respect Reduce Motion:

Accessibility

Built-in support for:
  • Dynamic Type - All text scales automatically
  • VoiceOver - All components labeled
  • High Contrast - Semantic colors adapt
  • Reduced Motion - Respects system preference
  • Minimum Touch Targets - 44pt minimum

Key Files

Dependencies

  • None - DesignSystem is independent

Used By

  • All features - Every UI component
  • App Shell - Main app screens
  • Feature modules - Chat, Rating, Settings

Best Practices

  • Never hardcode colors
  • Never hardcode spacing
  • Use semantic names
  • Test in all themes
  • Use design tokens exclusively
  • Support all themes
  • Add accessibility labels
  • Test Dynamic Type
  • Include preview
  • Semantic colors only
  • Support light + dark
  • Instant switching
  • Persist preference

Learn More

Full Documentation

Complete DesignSystem guide

Feature Settings

Theme selection UI

Building Guide

Customize themes

Architecture

See how modules use DesignSystem

Test Coverage

The DesignSystemTests target (token + snapshot tests) runs as part of the workspace suite — ~598 tests across 12 package test targets plus the app test suites, all in one Boilerplate.xctestplan pass. Tests include:
  • Theme switching
  • Color mapping
  • Component snapshots
  • Accessibility
  • Dynamic Type