home / skills / pokotieru-mashumaro / claude-code-template-ios-backend / ios-design

This skill helps you craft production-grade iOS interfaces with SwiftUI, delivering polished, native-feeling screens that respect Apple's guidelines.

npx playbooks add skill pokotieru-mashumaro/claude-code-template-ios-backend --skill ios-design

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
6.7 KB
---
name: ios-design
description: 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.
license: Complete terms in LICENSE.txt
---

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

1. **Structure first**: Define the view hierarchy and data flow
2. **Layout foundation**: Establish spacing, safe areas, scroll behavior
3. **Visual layer**: Colors, typography, shapes, materials
4. **Animation layer**: State transitions, micro-interactions
5. **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

Overview

This skill creates distinctive, production-grade iOS interfaces using SwiftUI. It guides the design direction, accessibility, and implementation so screens and components feel native, polished, and unique while respecting Apple's Human Interface Guidelines. Use it to produce working, refined SwiftUI views that are ready for integration and iteration.

How this skill works

Provide a screen, component, or view requirement with context (purpose, audience, constraints). The skill chooses a clear aesthetic direction, defines layout and hierarchy, applies semantic colors and typography, and generates SwiftUI code with animations, accessibility, and previews. Output emphasizes reusable components, asset-aware theming, dark mode, and practical polish like haptics and micro-interactions.

When to use it

  • Build a new screen or onboarding flow that must feel native and refined
  • Create reusable UI components (cards, lists, controls) consistent with app identity
  • Convert wireframes or mockups into production-ready SwiftUI code
  • Implement accessible, dark-mode-ready views that adapt to Dynamic Type
  • Prototype polished animations and transitions for review or handoff

Best practices

  • Start by defining purpose, tone, and signature detail before coding
  • Use Dynamic Type and SF Pro typography with weight contrast for hierarchy
  • Favor semantic colors and asset catalog variants for light/dark consistency
  • Keep views focused; extract components and use @Environment for tokens
  • Test previews with accessibility sizes, light/dark modes, and locale variants

Example use cases

  • A financial dashboard with dense data made readable through cards and subtle motion
  • An onboarding flow with hero transitions and progressive disclosure using matchedGeometryEffect
  • A custom media player control with tactile feedback, gradients, and slick animations
  • A settings screen with grouped, accessible toggles and inline validation
  • A profile screen featuring edge-bleed imagery, layered materials, and adaptive layout

FAQ

Will the generated code support dark mode and Dynamic Type?

Yes — every view is built with semantic colors, asset catalog recommendations, and Dynamic Type usage to ensure proper scaling and intentional dark-mode design.

Can I get reusable components separated into files?

Yes — the approach extracts components, provides PreviewProvider variants, and suggests where to place design tokens and assets for easy integration.