Documentation Index
Fetch the complete documentation index at: https://docs.swiftaiboilerplate.com/llms.txt
Use this file to discover all available pages before exploring further.
Full technical details in your project at
/docs/modules/DesignSystem.mdWhat You Get
- ✅ Token system - Colors, spacing, typography, radius (never hardcode values)
- ✅ 5 themes - System, Light, Dark, Aurora, Obsidian
- ✅ Liquid Glass primitive -
SAIGlasswith 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
Liquid Glass
v2.0 introducesSAIGlass, 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:
| Modifier | Purpose |
|---|---|
.saiGlass(_:in:interactive:) | Apply a glass material to any view. in: accepts any Shape; interactive: enables tap-response morphing on iOS 26. |
.saiScrollEdgeGlass(_:) | Glass treatment at scroll edges (under nav bars, tab bars). |
.saiSidebarAdaptable() | Adaptive sidebar styling for iPad and large displays. |
.saiTabBarMinimize(_:) | Opt into iOS 26 tab bar minimisation on scroll. iOS 17–25 no-op. |
SAIGlassContainer
Use when multiple glass surfaces sit near each other so they sample the same background instead of stacking visually:SAITabBarMinimizeStyle
BrandConfig (Customize Your App)
Single file to customize app identity. FromBrandConfig.swift:
- Change
appDisplayName→ Your app name - Update
AccentPrimarycolor inDesignSystemColors.xcassets - Change
avatarFallbackSymbol→ Your icon - Entire app updates automatically!
Design Tokens (Production System)
DSColors - Theme-Aware
Every color adapts to the active theme:- 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
- Inputs
- Cards & Rows
- Other
Theme System
5 Built-in Themes
System
Follows iOS light/dark mode
Light
Always light appearance
Dark
Always dark appearance
Aurora
Teal/purple premium theme
Obsidian
Charcoal/amber professional
Applying Themes
How It Works
Customization Examples
Create Custom Theme
Add Color Set
In
DesignSystemColors.xcassets, create:MyThemePrimary.colorsetMyThemeBackground.colorset- … (all semantic colors)
Create Custom Component
Animations
Smooth, consistent animations: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
| Component | Location |
|---|---|
| Tokens | Packages/DesignSystem/Sources/DesignSystem/Tokens/ |
| Components | Packages/DesignSystem/Sources/DesignSystem/Components/ |
| Colors | Packages/DesignSystem/Sources/DesignSystem/Resources/ |
Dependencies
- None - DesignSystem is independent
Used By
- All features - Every UI component
- App Shell - Main app screens
- Feature modules - Chat, Settings, Profile
Best Practices
Using Tokens
Using Tokens
- Never hardcode colors
- Never hardcode spacing
- Use semantic names
- Test in all themes
Creating Components
Creating Components
- Use design tokens exclusively
- Support all themes
- Add accessibility labels
- Test Dynamic Type
- Include preview
Theming
Theming
- 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
90%+ - Token and component testing Tests include:- Theme switching
- Color mapping
- Component rendering
- Accessibility
- Dynamic Type
