A comprehensive design language for the Retain iOS app — colors, typography, spacing, and component patterns extracted from the live codebase.
SwiftUI · iOS 17+ · v1.0All colors are defined in DesignSystem/Colors.swift and accessed via Color.retain.*
Dual-mode system: Charter (serif) for reading surfaces, SF Pro (system) for control surfaces. Defined in Typography.swift, AppFont.swift, StyleConfig.swift.
| Surface | Font | When to Use |
|---|---|---|
| Reading | Charter | Titles, body text, content headings, card titles, quotes, long-form |
| Control | SF Pro | Buttons, tabs, pills, badges, metadata, navigation, search, labels |
| Code | JetBrains Mono | Code blocks, technical content, monospaced displays |
7-step spacing scale defined in DesignSystem/Spacing.swift. All layout uses these tokens exclusively.
Three button styles plus a floating action button. Height: 56pt, corner radius: 16pt. Defined in DesignSystem/RetainButton.swift.
| Style | Background | Text Color | Shadow |
|---|---|---|---|
| Primary | #3D5A4E → #344A40 gradient + white 20% stroke | White | rgba(52,74,64,0.25) · r12 · y4 |
| Secondary | #FFFFFF | Neutral 900 | rgba(0,0,0,0.06) · r16 · y4 |
| Destructive | #FFFFFF | Red 500 (#EF4444) | rgba(0,0,0,0.06) · r16 · y4 |
| Compose FAB | #B85520 | White | rgba(184,85,32,0.3) · r12 |
| State | Behavior |
|---|---|
| Loading | ProgressView spinner replaces/accompanies text, button disabled |
| Disabled | 50% opacity, tap disabled |
| Default | Full opacity, interactive |
Reusable building blocks from the DesignSystem/ and Features/ directories.
5-tab bottom navigation with a centered compose FAB. Active state uses warm accent (#B85520).
| Element | Spec |
|---|---|
| Tab bar | 5 items, center is 48pt circular FAB (warm accent), standard tab icons below |
| Active color | #B85520 warm accent |
| Inactive color | System tertiary label |
| Badge | Unread dot on Actions & Profile tabs; count badge on Actions |
| Routing | NavigationStack with path-based routing, 10 screen destinations |
| Back gesture | Edge swipe — 60pt trigger zone, 120pt vertical tolerance |
9 distinct memory categories, each with a unique icon, color, and background.
Color-coded badge system for task priority and category.
SF Symbols throughout with consistent sizing. No custom icon library — all icons from Apple's system set.
| Tab | SF Symbol | Usage |
|---|---|---|
| Home | house.fill | Home tab |
| Memories | timelapse | Memories tab |
| Compose | pencil.line | Center FAB |
| Actions | bolt.fill | Actions tab (with badge) |
| Profile | person.fill | Profile tab |
| Action | SF Symbol |
|---|---|
| Checkmark | checkmark / checkmark.circle |
| Error/Warning | exclamationmark.triangle |
| Play | play.fill |
| Record | mic.fill / waveform |
| Meeting | person.2.fill |
| Chat | bubble.left.and.bubble.right.fill |
| Checklist | checklist |
| Knowledge | book.fill |
| Ideas | lightbulb.fill |
How to translate these tokens into your Figma design system.
Create a Figma Variables collection called Retain/Colors with these groups. Use variable modes for Light/Dark where iOS uses system-adaptive colors.
| Group | Variables | Note |
|---|---|---|
| Brand | primary, primary-light, primary-dark | Fixed hex values |
| Accent | warm-accent, warm-accent-light | Fixed hex values |
| Surface | surface, surface-secondary, surface-tertiary | Light/Dark modes |
| Text | text-primary, text-secondary, text-tertiary | Light/Dark modes |
| Warm | warm-bg, warm-card, warm-input, warm-border, warm-divider | Light mode only |
| Neutral | 50 through 900 (10 steps) | Fixed hex values |
| Semantic | blue, rose, green, amber, violet, orange, red, purple, teal (50–700 each) | Fixed hex values |
| Chat | chat-user, chat-assistant, mention | Derived with opacity |
| System | separator, destructive, success, warning | Light/Dark modes |
Create two style families. Use Charter (bundled, available in Figma) for reading and SF Pro for controls.
| Style Name | Font | Size | Weight |
|---|---|---|---|
| Control/LargeTitle | SF Pro Display | 34 | Bold |
| Control/Title | SF Pro Display | 22 | Semibold |
| Control/Headline | SF Pro Text | 17 | Semibold |
| Control/Body | SF Pro Text | 17 | Regular |
| Control/Callout | SF Pro Text | 16 | Regular |
| Control/Caption | SF Pro Text | 12 | Regular |
| Control/Caption2 | SF Pro Text | 11 | Regular |
| Reading/Body | Charter | 17 | Roman |
| Reading/Body Bold | Charter | 17 | Bold |
| Reading/Body Italic | Charter | 17 | Italic |
| Code/Regular | JetBrains Mono | 14 | Regular |
Create a Retain/Spacing number variables collection.
| Token | Value | Usage |
|---|---|---|
| spacing/xs | 4 | Tight inline spacing |
| spacing/sm | 8 | Icon-to-text, compact padding |
| spacing/md | 12 | Default internal padding |
| spacing/lg | 16 | Section padding, card padding |
| spacing/xl | 24 | Major section gaps |
| spacing/xxl | 32 | Screen margins, large gaps |
| spacing/xxxl | 48 | Hero spacing |
| radius/sm | 8 | Inputs, small elements |
| radius/md | 12 | Cards, badges |
| radius/lg | 16 | Buttons, chat bubbles |
| radius/xl | 22 | Modals, pills |
| radius/xxl | 28 | Sheets, overlays |
Create these as Figma components with variants and auto-layout.
| Component | Variants | Key Properties |
|---|---|---|
| Button | Primary, Secondary, Destructive × Default, Loading, Disabled | h56, r16, full-width, headline font |
| FAB | Default | 48×48 circle, warm accent bg |
| Card | Warm, Simple, Default | r12, lg padding, subtle shadow |
| TaskCard | By priority × By category | Checkbox + Charter title + badges |
| ChatBubble | User, Assistant | r16 (r8 tail corner), max 85% width |
| Badge | Priority (High/Med/Low) + Category (6 types) | Pill shape, border, semantic colors |
| MemoryBadge | 9 memory types | Icon + colored background + label |
| TabBar | 5 tabs with active states | Center FAB, warm accent active |
| Skeleton | Card, Message, List | Shimmer gradient placeholder |
| EmptyState | Default | Icon + title + subtitle + CTA |
| ErrorState | With/without retry | Warning icon + message + button |
| ProfileHeader | Default | Avatar (initials fallback) + info |
Quick reference for how tokens are accessed in the SwiftUI codebase.