design-ios · diff
git:20260927.43a351c to git:20261012.0cd6b32
73 added, 92 removed. Audit A to A.
---
name: design-ios
- description: "Use when designing an iOS or macOS screen or flow — deliverable is a device/window-framed HTML mockup and handoff spec, never SwiftUI code."
- when-to-use: "Designing an iOS or macOS screen or flow — the deliverable is a device/window-framed HTML mockup and a handoff spec for swift-expert or an Apple-platform developer to implement, not working SwiftUI."
- keywords: ios, macos, hig, dynamic-type, liquid-glass, swiftui, handoff, mockup, desktop-tinting
+ description: "Use when designing a screen or flow for any Apple platform — iPhone (incl. iPhone Duo), iPad, Mac, Apple Watch, Apple TV or Vision Pro — deliverable is a device/window-framed HTML mockup and a handoff spec, never SwiftUI code."
+ when-to-use: "Designing an iOS, iPadOS, macOS, watchOS, tvOS or visionOS screen or flow — the deliverable is a framed HTML mockup and a handoff spec for swift-expert or an Apple-platform developer to implement, not working SwiftUI."
+ keywords: ios, ipados, macos, watchos, tvos, visionos, iphone-duo, hig, dynamic-type, liquid-glass, contrast, handoff, mockup
priority: critical
related: design-method, design-system, design-review
---
<objective>
- Produces iOS and macOS mockups and developer handoff specs: mapping design tokens to the Dynamic Type scale (iOS) or macOS's fixed text-size variants, semantic colors, device/window viewports, Liquid Glass materials, and macOS-specific conventions (system window chrome, desktop tinting, pointer states).
+ Produces Apple-platform mockups and developer handoff specs: design tokens mapped to the
+ HIG text styles of the target platform, semantic colors with verified contrast, size-class
+ aware canvases, Liquid Glass used only in the functional layer, and platform conventions
+ (system window frame on macOS, focus on tvOS, glass windows and ornaments on visionOS,
+ glanceable screens on watchOS, vertical controls on iPhone Duo).
- The deliverable is a device-framed (iOS) or window-framed (macOS) HTML mockup at exact viewport dimensions plus a SwiftUI-ready handoff spec (named tokens, text styles, semantic colors, sizing, states, spacing). This skill never writes SwiftUI code — implementation is left to `swift-expert` or an Apple-platform developer.
+ The deliverable is a framed HTML mockup plus a SwiftUI-ready handoff spec (named tokens,
+ text styles, semantic colors, sizing, states, spacing). This skill never writes SwiftUI —
+ implementation goes to `swift-expert` or an Apple-platform developer.
</objective>
- ## Design iOS/macOS — Mockup and Handoff, Not Code
+ ## Design for Apple Platforms — Mockup and Handoff, Not Code
### When
- After `design-system` tokens exist. This skill never writes SwiftUI — it produces a
- static HTML mockup at exact device/window dimensions plus a spec that `swift-expert` or
- an Apple-platform developer implements.
+ After `design-system` tokens exist.
### Input
- `design-system.md` — OKLCH palette, typography direction, motion personality.
- - The screen/flow to mock up and the target platform: iPhone / iPad (iOS) or a resizable
- window (macOS).
-
- ### Steps — iOS
-
- 1. **Map tokens to iOS roles.** Typography → Dynamic Type text styles, anchored at Body
- 17pt down to Caption 2 11pt (never fixed point sizes) — see `references/dynamic-type.md`.
- Colors → semantic color roles (never raw RGB/hex) — see `references/semantic-colors.md`.
- 2. **Pick the device viewport(s)** from `references/viewports.md` — mock up in exact
- points at the chosen scale factor.
- 3. **Build the HTML mockup**: a device-frame `<div>` at the exact viewport dimensions,
- `viewport-fit=cover` meta tag, `env(safe-area-inset-*)` for notch/Dynamic Island/home
- indicator spacing. See `references/mockup.md`.
- 4. **Apply Liquid Glass where it fits** — a floating layer of controls *above* regular
- content, not a content background. Two variants: **regular** (content-aware, the
- default for controls) and **clear** (more transparent — dim the content beneath it
- ~35% when clear sits over light content, so controls stay legible). Plus control
- morphing, concentricity between nested shapes, layered icon treatment. Source:
- developer.apple.com/design/human-interface-guidelines/materials (Liquid Glass, introduced iOS 26, current in iOS 27).
- See `references/liquid-glass.md` — do not invent numeric corner-radius values; none are
- published.
- 5. **Verify touch targets and contrast**: 44×44pt minimum touch target (see
- `references/touch-targets.md`); **4.5:1 minimum contrast in Dark Mode** for body text
- (WCAG AA, HIG-endorsed) — check both light and dark against
- `references/semantic-colors.md` roles, not a single-mode check.
- 6. **Sidebar navigation ≤ 2 levels deep.** If the flow needs a 3rd level, restructure
- (tabs, push navigation, or a secondary sidebar) rather than nesting a 3rd disclosure
- tier — deeper sidebars are a documented HIG anti-pattern for iPadOS/macOS sidebars.
- Source: developer.apple.com/design/human-interface-guidelines/layout.
- 7. **Write the handoff spec** per `references/handoff-swiftui.md`: named tokens only
- (never raw values), Dynamic Type text styles (never fixed sizes), semantic colors,
- explicit sizing behavior (fixed/hug/fill) per element, all interaction states
- (disabled/pressed/focused), spacing in pt.
+ - The screen/flow and the target platform(s). Pick the platform reference first:
- ### Steps — macOS
+ | Target | Read |
+ |---|---|
+ | iPhone | steps below + `references/dynamic-type.md` |
+ | iPad, resizable window, iPhone Duo | + `references/ipados-iphone-duo.md` |
+ | Mac | + `references/macos.md`, `references/type-scales-other.md` |
+ | Apple Watch, Apple TV, Vision Pro | + `references/watch-tv-vision.md`, `references/type-scales-other.md` |
- 1. **Map tokens to macOS text sizes.** macOS uses its own fixed scale, distinct from iOS
- Dynamic Type — confirmed anchors: **Large Title 26pt** down to **body ~13pt**, floor
- **Caption 2 ~10pt**. Source: developer.apple.com/design/human-interface-guidelines/typography.
- **Gap — do not invent**: the full intermediate scale (Title 1–3, Headline, Subhead,
- Footnote point values) is not confirmed in this pass; reconfirm on the HIG typography
- page or Xcode's SF font catalog before using an intermediate size verbatim.
- 2. **No Dynamic Type on macOS** — the platform ships fixed size *variants per context*
- (e.g. control sizes: regular/small/mini) instead of a user-adjustable type scale. Pick
- the variant that matches the control's context, don't apply an iOS Dynamic Type style.
- 3. **Never draw a custom window chrome.** Title bar, traffic lights, toolbar, and sidebar
- are system-drawn; the mockup should frame content inside a standard macOS window shape,
- not invent custom chrome. Source: developer.apple.com/design/human-interface-guidelines/windows.
- 4. **Desktop tinting**: background materials pick up a subtle tint from the desktop
- picture/wallpaper behind the window — reflect this as a soft, low-opacity tint layer in
- the mockup, not a flat opaque background. Source:
- developer.apple.com/design/human-interface-guidelines/materials.
- 5. **Pointer feedback, not touch feedback**: hover, highlight, and lift states on
- interactive elements (buttons, list rows) — macOS is pointer-driven, so every hoverable
- control needs a hover state in the mockup and handoff spec, unlike iOS/iPadOS touch-only
- flows. Source: developer.apple.com/design/human-interface-guidelines/pointing-devices.
- 6. **Window sizing is a mockup convenience, not a spec.** Unlike iOS device viewports,
- macOS windows are user-resizable — pick a reasonable default canvas (e.g. common
- productivity-app widths) for the mockup, but do not present it as an official fixed
- dimension; state that explicitly in the handoff spec.
- 7. **Write the handoff spec** per `references/handoff-swiftui.md`, adapted: macOS text
- sizes instead of Dynamic Type styles, hover/pressed/focused states (pointer, not touch),
- otherwise same named-token discipline.
+ ### Steps
+ 1. **Map tokens to platform roles.** Typography → the platform's HIG text styles by name
+ (iOS/iPadOS Dynamic Type: Body 17 pt … Caption 2 11 pt; macOS fixed styles: Body 13 pt
+ … Large Title 26 pt; tvOS/watchOS tables) — `dynamic-type.md`, `type-scales-other.md`.
+ Colors → semantic roles, never raw hex — `semantic-colors.md`.
+ 2. **Choose canvases by size class**, not by device: at least compact width, regular width,
+ and the key screen at AX5 text size. The HIG no longer publishes device point sizes —
+ take them from Xcode Device Hub and record the source — `viewports.md`.
+ 3. **Build the HTML mockup**: frame at the recorded point size (1 pt = 1 CSS px),
+ `viewport-fit=cover`, `env(safe-area-inset-*)` for Dynamic Island / home indicator —
+ `mockup.md`. macOS: a standard system window frame, never custom chrome — `macos.md`.
+ 4. **Liquid Glass only in the functional layer** (tab bars, toolbars, sidebars, key
+ controls), never in content. Regular variant by default and for text-heavy surfaces;
+ clear only over rich media, with a 35% dark dimming layer over bright content; accent
+ color on the primary action's background, sparingly. No published corner radius —
+ concentric nesting instead — `liquid-glass.md`.
+ 5. **Verify targets and contrast**: platform control sizes (iOS 44×44 pt, macOS 28×28,
+ tvOS 66×66, visionOS 60×60, watchOS 44×44) and spacing — `touch-targets.md`. Contrast
+ **4.5:1 minimum** (3:1 for ≥18 pt or bold), **7:1 target** for custom colors and small
+ text, checked in light, dark **and** Increase Contrast — `semantic-colors.md`.
+ Sources: https://developer.apple.com/design/human-interface-guidelines/dark-mode and
+ https://developer.apple.com/design/human-interface-guidelines/accessibility.
+ 6. **Sidebar ≤ 2 levels.** Deeper hierarchy → a split view with a **content list between
+ the sidebar and the detail view**, not a third disclosure tier. Consider a tab bar
+ first on iPad. Source:
+ https://developer.apple.com/design/human-interface-guidelines/sidebars.
+ 7. **Platform pass** — apply the platform reference picked above (macOS desktop tinting
+ only under the graphite accent; tvOS 60/80 pt safe area and focus growth; visionOS
+ ornaments for controls only; watchOS ≤3 glyph buttons per row; iPhone Duo controls on
+ the side and the fold reserved region).
+ 8. **Look at the render** — screenshot each canvas (light, dark, AX5) and Read the PNGs
+ before calling the mockup done; fix what you see, then hand off to `design-review`.
+ 9. **Write the handoff spec** per `handoff-swiftui.md`: named tokens only, text styles by
+ name, semantic colors, sizing (fixed/hug/fill), all states (disabled/pressed/focused,
+ plus pointer style on macOS and focus on tvOS), spacing in pt, canvas sources.
### Failure Handling
- - Screenshot/preview tooling unavailable → describe the mockup in the handoff spec with
- exact pt values instead of blocking on a visual.
- - A fact needed isn't in the references below → mark it "to reconfirm on
- developer.apple.com" in the output; never invent a number. This applies in particular to
- **iOS/macOS spacing and corner-radius grids — neither is published as an official numeric
- scale**; do not invent an 8pt-style grid for Apple platforms, point instead to Xcode's
- Design Resources / SF Symbols catalog as the source of truth to reconfirm against.
+ - Screenshot tooling unavailable → say so in the report (`visual check: not run`) and
+ describe the mockup with exact pt values; never claim a visual check that didn't run.
+ - A needed value isn't in the references or on the cited HIG page → mark it "to reconfirm
+ on developer.apple.com"; never invent a number. Apple publishes **no numeric spacing or
+ corner-radius grid** — don't impose an 8-pt grid; a chosen value is a project token.
### Output
- - Device-framed (iOS) or window-framed (macOS) HTML mockup at exact viewport
- points/reasonable default canvas.
- - `handoff.md` (or equivalent) with named tokens, text styles, semantic colors, sizing,
- states, spacing — ready for `swift-expert`.
+ - Framed HTML mockup(s) per canvas, plus their screenshots.
+ - `handoff.md` with named tokens, text styles, semantic colors, sizing, states, spacing,
+ canvas sources — ready for `swift-expert`.
- ### Next → `design-review` (mockup-scoped: screenshot the mockup, verify contrast, no
- full site audit loop).
+ ### Next → `design-review` (mockup-scoped: screenshot, contrast, no full site audit loop).
### References
| File | Purpose |
|------|---------|
- | `references/dynamic-type.md` | **Canonical iOS Dynamic Type scale (Large) — verified iosfontsizes.com** |
- | `references/semantic-colors.md` | **Canonical semantic color roles — verified WWDC19, still current** |
- | `references/viewports.md` | **Canonical iOS device viewports in points — verified ios-resolution.com** |
- | `references/liquid-glass.md` | **Canonical Liquid Glass facts — verified developer.apple.com, iOS 26–27** |
- | `references/touch-targets.md` | 44×44pt default / 28×28pt minimum control size — verified HIG Accessibility |
+ | `references/dynamic-type.md` | iOS/iPadOS Dynamic Type (Large + AX5), default/min sizes — HIG Typography |
+ | `references/type-scales-other.md` | macOS, tvOS, watchOS text styles; visionOS notes — HIG Typography |
+ | `references/semantic-colors.md` | Semantic roles, contrast 4.5/3/7:1, increased contrast, base/elevated — HIG Color, Dark Mode |
+ | `references/viewports.md` | Size classes, safe areas, canvas sizing via Device Hub — HIG Layout |
+ | `references/liquid-glass.md` | Liquid Glass layering, variants, color, per platform — HIG Materials, Color |
+ | `references/touch-targets.md` | Control sizes for all platforms + spacing — HIG Accessibility |
+ | `references/macos.md` | Window frame, fixed type, desktop tinting, pointer, sidebars — HIG |
+ | `references/ipados-iphone-duo.md` | iPadOS + iPhone Duo poses, reserved regions, vertical controls — HIG |
+ | `references/watch-tv-vision.md` | watchOS, tvOS, visionOS basics — HIG |
| `references/mockup.md` | Device-frame HTML/CSS technique (safe areas, viewport-fit) |
| `references/handoff-swiftui.md` | SwiftUI-ready handoff spec format |
-
- **Gap (not covered by any reference file, inlined above from HIG, flagged for a future
- `references/macos.md`)**: macOS type-size anchors, no-Dynamic-Type rule, system window
- chrome, desktop tinting, pointer states. Out of this pass's exclusive scope to create.