This skill guides creation of distinctive, production-grade iOS interfaces using SwiftUI. Implement real working code with exceptional attention to aesthetic details and creative choices that feel authentically Apple while maintaining unique character.
The user provides iOS UI requirements: a screen, component, view, or interface to build. They may include context about the purpose, audience, or technical constraints.
Design Thinking
Before coding, understand the context and commit to a clear aesthetic direction:
- Purpose: What problem does this interface solve? Who uses it? What's the core user action?
- Tone: Pick a direction that fits: elegant/refined, playful/vibrant, professional/serious, warm/friendly, bold/striking, calm/meditative, energetic/dynamic, luxurious/premium, approachable/casual, focused/minimal
- Context: Where does this screen live in the app flow? What comes before/after?
- Differentiation: What makes this interface memorable? What's the signature detail?
CRITICAL: Choose a clear conceptual direction and execute it with precision. The best iOS apps have a consistent personality that users can feel.
Then implement working SwiftUI code that is:
- Production-grade and functional
- Visually refined and memorable
- Cohesive with Apple's design language while having unique character
- Meticulously polished in every detail
iOS Design Principles
Typography
- SF Pro is the system default - use it intentionally with proper weights and optical sizes
- Use Dynamic Type (
Font.body, Font.headline, etc.) for accessibility
- Create hierarchy through weight contrast (Ultralight to Black) rather than just size
- Consider SF Pro Rounded for friendlier interfaces
- Custom fonts: Choose distinctive display fonts for headers, keep body text readable
- Respect text scaling - your layouts must adapt to accessibility sizes
Color & Theme
- Semantic colors first:
Color.primary, Color.secondary, Color.accentColor
- Define a signature accent color that becomes the app's identity
- Use Asset Catalogs with light/dark variants for all custom colors
- Gradients: Linear and angular gradients add depth - use sparingly but boldly
- Vibrancy and materials:
.ultraThinMaterial, .regularMaterial for layered depth
- Avoid flat, lifeless backgrounds - add subtle texture or gradient
Dark Mode
- Mandatory: Every view must look intentional in both light and dark modes
- Dark mode is not just "inverted colors" - it's a separate design exercise
- Use
Color(.systemBackground) hierarchy: primary, secondary, tertiary
- Ensure sufficient contrast - test with Accessibility Inspector
- Consider OLED-friendly true blacks where appropriate
Motion & Animation
SwiftUI's animation system is powerful - use it thoughtfully:
- withAnimation for state changes with
.spring(), .easeInOut, .interpolatingSpring()
- matchedGeometryEffect for hero transitions between views
- phaseAnimator and keyframeAnimator (iOS 17+) for complex sequences
- Micro-interactions: button presses (
.scaleEffect), toggle feedback, loading states
- Page transitions:
.transition(.asymmetric(...)) for entering/exiting
- Scroll effects:
.scrollTransition, parallax, sticky headers
- Haptics:
UIImpactFeedbackGenerator for tactile feedback on key actions
Timing matters: Quick (0.2s) for feedback, medium (0.35s) for transitions, slow (0.5s+) for dramatic reveals.
Spatial Composition
- Safe Areas: Respect them, but know when to edge-bleed for impact
- Padding: Use consistent spacing (8pt grid).
padding() defaults are often too tight
- Embrace negative space - cramped UIs feel cheap
- Cards and surfaces: Rounded corners (12-20pt), subtle shadows, layered depth
- Full-bleed images: Let photos breathe edge-to-edge
- Consider asymmetry for visual interest while maintaining functional clarity
SF Symbols
Apple's icon system is extensive and expressive:
- Use hierarchical and multicolor rendering modes
- Apply variable color for animated states (e.g., Wi-Fi strength)
- Symbol effects:
.bounce, .pulse, .variableColor, .replace
- Custom symbols: Create when needed, but prefer built-in for consistency
- Size symbols relative to text with
Font.system(size:).weight()
Native Components Done Right
Elevate standard components beyond defaults:
- Lists: Custom row designs, swipe actions, section headers with personality
- Navigation: Large titles, custom back buttons, toolbar items
- Sheets: Detents (
.presentationDetents), custom backgrounds
- Buttons: Beyond
.bordered - custom shapes, gradients, press states
- Text Fields: Floating labels, inline validation, character counts
- Tab Bars: Custom icons, badges, selection indicators
Gestures & Interactions
- DragGesture for swipe-to-dismiss, card stacks, sliders
- LongPressGesture with preview/context menus
- MagnificationGesture for zoom interactions
- Combine gestures with
.simultaneously and .sequenced
- Always provide visual feedback during gesture
Anti-Patterns to Avoid
NEVER create generic iOS interfaces with:
- Unstyled default components without customization
- Flat, solid color backgrounds with no depth
- Missing dark mode support
- Ignoring Dynamic Type and accessibility
- Web-like layouts that don't feel native
- Overuse of SF Symbols without consideration
- Animations that feel slow or janky
- Cramped layouts without breathing room
- Inconsistent corner radii and spacing
Implementation Approach
- Structure first: Define the view hierarchy and data flow
- Layout foundation: Establish spacing, safe areas, scroll behavior
- Visual layer: Colors, typography, shapes, materials
- Animation layer: State transitions, micro-interactions
- Polish pass: Shadows, haptics, edge cases, accessibility
Remember: The best iOS apps feel inevitable - as if they could only exist on Apple's platform. Embrace SwiftUI's declarative nature, leverage platform capabilities, and create interfaces that users will love to interact with.
Code Quality
- Use
@ViewBuilder for complex conditional views
- Extract reusable components into separate files
- Prefer composition over inheritance
- Use
PreviewProvider with multiple configurations (dark mode, large text, etc.)
- Consider
@Environment for propagating design tokens
- Keep views focused - if it's doing too much, split it
1---2name: ios-design3description: Create distinctive, production-grade iOS interfaces with SwiftUI. Use this skill when the user asks to build iOS screens, components, or views. Generates polished, native-feeling code that goes beyond generic templates while respecting Apple's Human Interface Guidelines.4license: Complete terms in LICENSE.txt5---6
7This skill guides creation of distinctive, production-grade iOS interfaces using SwiftUI. Implement real working code with exceptional attention to aesthetic details and creative choices that feel authentically Apple while maintaining unique character.
8
9The user provides iOS UI requirements: a screen, component, view, or interface to build. They may include context about the purpose, audience, or technical constraints.
10
11## Design Thinking
12
13Before coding, understand the context and commit to a clear aesthetic direction:
14- **Purpose**: What problem does this interface solve? Who uses it? What's the core user action?
15- **Tone**: Pick a direction that fits: elegant/refined, playful/vibrant, professional/serious, warm/friendly, bold/striking, calm/meditative, energetic/dynamic, luxurious/premium, approachable/casual, focused/minimal
16- **Context**: Where does this screen live in the app flow? What comes before/after?
17- **Differentiation**: What makes this interface memorable? What's the signature detail?
18
19**CRITICAL**: Choose a clear conceptual direction and execute it with precision. The best iOS apps have a consistent personality that users can feel.
20
21Then implement working SwiftUI code that is:
22- Production-grade and functional
23- Visually refined and memorable
24- Cohesive with Apple's design language while having unique character
25- Meticulously polished in every detail
26
27## iOS Design Principles
28
29### Typography
30- **SF Pro** is the system default - use it intentionally with proper weights and optical sizes
31- Use **Dynamic Type** (`Font.body`, `Font.headline`, etc.) for accessibility
32- Create hierarchy through weight contrast (Ultralight to Black) rather than just size
33- Consider **SF Pro Rounded** for friendlier interfaces
34- Custom fonts: Choose distinctive display fonts for headers, keep body text readable
35- Respect text scaling - your layouts must adapt to accessibility sizes
36
37### Color & Theme
38- **Semantic colors** first: `Color.primary`, `Color.secondary`, `Color.accentColor`
39- Define a signature accent color that becomes the app's identity
40- Use **Asset Catalogs** with light/dark variants for all custom colors
41- Gradients: Linear and angular gradients add depth - use sparingly but boldly
42- Vibrancy and materials: `.ultraThinMaterial`, `.regularMaterial` for layered depth
43- Avoid flat, lifeless backgrounds - add subtle texture or gradient
44
45### Dark Mode
46- **Mandatory**: Every view must look intentional in both light and dark modes
47- Dark mode is not just "inverted colors" - it's a separate design exercise
48- Use `Color(.systemBackground)` hierarchy: primary, secondary, tertiary
49- Ensure sufficient contrast - test with Accessibility Inspector
50- Consider OLED-friendly true blacks where appropriate
51
52### Motion & Animation
53SwiftUI's animation system is powerful - use it thoughtfully:
54- **withAnimation** for state changes with `.spring()`, `.easeInOut`, `.interpolatingSpring()`
55- **matchedGeometryEffect** for hero transitions between views
56- **phaseAnimator** and **keyframeAnimator** (iOS 17+) for complex sequences
57- Micro-interactions: button presses (`.scaleEffect`), toggle feedback, loading states
58- Page transitions: `.transition(.asymmetric(...))` for entering/exiting
59- Scroll effects: `.scrollTransition`, parallax, sticky headers
60- **Haptics**: `UIImpactFeedbackGenerator` for tactile feedback on key actions
61
62**Timing matters**: Quick (0.2s) for feedback, medium (0.35s) for transitions, slow (0.5s+) for dramatic reveals.
63
64### Spatial Composition
65- **Safe Areas**: Respect them, but know when to edge-bleed for impact
66- **Padding**: Use consistent spacing (8pt grid). `padding()` defaults are often too tight
67- Embrace **negative space** - cramped UIs feel cheap
68- **Cards and surfaces**: Rounded corners (12-20pt), subtle shadows, layered depth
69- **Full-bleed images**: Let photos breathe edge-to-edge
70- Consider **asymmetry** for visual interest while maintaining functional clarity
71
72### SF Symbols
73Apple's icon system is extensive and expressive:
74- Use **hierarchical** and **multicolor** rendering modes
75- Apply **variable color** for animated states (e.g., Wi-Fi strength)
76- Symbol effects: `.bounce`, `.pulse`, `.variableColor`, `.replace`
77- Custom symbols: Create when needed, but prefer built-in for consistency
78- Size symbols relative to text with `Font.system(size:).weight()`
79
80### Native Components Done Right
81Elevate standard components beyond defaults:
82- **Lists**: Custom row designs, swipe actions, section headers with personality
83- **Navigation**: Large titles, custom back buttons, toolbar items
84- **Sheets**: Detents (`.presentationDetents`), custom backgrounds
85- **Buttons**: Beyond `.bordered` - custom shapes, gradients, press states
86- **Text Fields**: Floating labels, inline validation, character counts
87- **Tab Bars**: Custom icons, badges, selection indicators
88
89### Gestures & Interactions
90- **DragGesture** for swipe-to-dismiss, card stacks, sliders
91- **LongPressGesture** with preview/context menus
92- **MagnificationGesture** for zoom interactions
93- Combine gestures with `.simultaneously` and `.sequenced`
94- Always provide visual feedback during gesture
95
96## Anti-Patterns to Avoid
97
98NEVER create generic iOS interfaces with:
99- Unstyled default components without customization
100- Flat, solid color backgrounds with no depth
101- Missing dark mode support
102- Ignoring Dynamic Type and accessibility
103- Web-like layouts that don't feel native
104- Overuse of SF Symbols without consideration
105- Animations that feel slow or janky
106- Cramped layouts without breathing room
107- Inconsistent corner radii and spacing
108
109## Implementation Approach
110
1111. **Structure first**: Define the view hierarchy and data flow
1122. **Layout foundation**: Establish spacing, safe areas, scroll behavior
1133. **Visual layer**: Colors, typography, shapes, materials
1144. **Animation layer**: State transitions, micro-interactions
1155. **Polish pass**: Shadows, haptics, edge cases, accessibility
116
117Remember: The best iOS apps feel inevitable - as if they could only exist on Apple's platform. Embrace SwiftUI's declarative nature, leverage platform capabilities, and create interfaces that users will love to interact with.
118
119## Code Quality
120
121- Use `@ViewBuilder` for complex conditional views
122- Extract reusable components into separate files
123- Prefer composition over inheritance
124- Use `PreviewProvider` with multiple configurations (dark mode, large text, etc.)
125- Consider `@Environment` for propagating design tokens
126- Keep views focused - if it's doing too much, split it