Ios animations
Skill ComeOnOliver/skillshub/skills/pproenca/dot-skills/ios-animations
π§ The right skill, one API call. AI agent skills registry with token-efficient skill resolution. 5,000+ skills from 500+ top repos.From the repository description
npx -y skills add ComeOnOliver/skillshub --skill ios-animationsAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
SKILL.md
10.5 KB, ~2.4k tokens by cl100k_base, as published. Nobody here has run it
dot-skills β Airbnb iOS SwiftUI Animations Best Practices
Opinionated, strict animation craft guide for SwiftUI iOS 26 / Swift 6.2 apps. Contains 50 rules across 8 categories, prioritized by impact. Derived from Airbnb Engineering motion patterns, Apple WWDC sessions, and Apple Human Interface Guidelines. Mandates @Equatable on every animated view, motion tokens for all spring/timing values, and design system tokens for layout.
Mandated Architecture Alignment
This skill is designed to work alongside swift-ui-architect and ios-design-system. All code examples follow the same non-negotiable constraints:
@Equatablemacro on every view (Airbnb measured 15% scroll hitch reduction)@Observablefor complex animation state that involves business logic triggers@Statefor view-owned animation state (toggle booleans, drag offsets)- Design system tokens:
Spacing.xs/sm/md/lg,Radius.sm/md/lgβ zero hardcoded layout numbers - Motion tokens:
Motion.standard/responsive/playfulβ zero scattered spring literals - Semantic colors:
.backgroundSurface,.accentPrimaryβ no raw Color literals in views - Feature animations remain presentation-only; data/network concerns stay in Data package
Scope & Relationship to Sibling Skills
This skill is the motion layer β it teaches how to BUILD fluid, performant animations. When loaded alongside sibling skills:
| Sibling Skill | Its Focus | This Skill's Focus |
|---|---|---|
swift-ui-architect | Architecture (modular MVVM-C, route shells, protocol boundaries) | Animation architecture (motion tokens, spring selection, orchestration) |
ios-design-system | Design system infrastructure (tokens, styles, governance) | Motion tokens and animated component patterns |
ios-hig | HIG compliance patterns | Motion-specific HIG (reduce motion, spatial continuity) |
Out of scope: Designer-authored vector animations (use Lottie for After Effects exports). Complex UIKit transition controllers (see Airbnb's declarative transition framework). This skill covers programmatic SwiftUI animations only.
Clinic Architecture Contract (iOS 26 / Swift 6.2)
All guidance in this skill assumes the clinic modular MVVM-C architecture:
- Feature modules import
Domain+DesignSystemonly (neverData, never sibling features) - App target is the convergence point and owns
DependencyContainer, concrete coordinators, and Route Shell wiring Domainstays pure Swift and defines models plus repository,*Coordinating,ErrorRouting, andAppErrorcontractsDataowns SwiftData/network/sync/retry/background I/O and implements Domain protocols- Read/write flow defaults to stale-while-revalidate reads and optimistic queued writes
- ViewModels call repository protocols directly (no default use-case/interactor layer)
When to Apply
Reference these guidelines when:
- Adding animations to SwiftUI views or transitions
- Building gesture-driven interactions (drag, swipe, pan)
- Connecting views with spatial transitions (expand/collapse, navigation morphs)
- Designing micro-interactions (button press, toggle, loading states)
- Making content changes feel physical (number rolls, symbol replacements)
- Choreographing multi-element animation sequences (KeyframeAnimator, PhaseAnimator)
- Defining motion tokens for a design system
- Reviewing animation code for performance, accessibility, and architecture compliance
Rule Categories by Priority
| Priority | Category | Impact | Prefix | Rules |
|---|---|---|---|---|
| 1 | Spring Physics | CRITICAL | spring- | 8 |
| 2 | Timing & Feel | CRITICAL | feel- | 6 |
| 3 | Gesture Continuity | HIGH | gesture- | 7 |
| 4 | Spatial Transitions | HIGH | spatial- | 6 |
| 5 | Micro-interactions | HIGH | micro- | 6 |
| 6 | Orchestration | HIGH | orch- | 5 |
| 7 | Craft & Polish | HIGH | craft- | 5 |
| 8 | Content Motion | MEDIUM-HIGH | content- | 5 |
Quick Reference
1. Spring Physics (CRITICAL)
spring-motion-tokensβ Define motion tokens as a caseless enum for all spring presetsspring-smooth-defaultβ Default to .smooth spring for all UI transitionsspring-snappy-responsiveβ Use .snappy spring for responsive interactionsspring-bouncy-celebrationβ Use .bouncy spring for playful and celebratory momentsspring-custom-parametersβ Tune custom springs with response and dampingFractionspring-velocity-preservationβ Springs preserve velocity on interruptionspring-never-linearβ Never use linear or easeInOut for interactive UIspring-completion-chainingβ Use withAnimation completion for chained sequences
2. Timing & Feel (CRITICAL)
feel-250ms-maxβ Keep UI animations under 250msfeel-faster-betterβ Faster animations almost always feel betterfeel-asymmetric-enter-exitβ Use asymmetric timing for enter and exitfeel-distance-proportionalβ Match duration to distance traveledfeel-haptic-syncβ Sync haptic feedback to visual animation keyframesfeel-stagger-timingβ Stagger reveals at 30-50ms intervals
3. Gesture Continuity (HIGH)
gesture-rubber-bandβ Rubber band at drag boundariesgesture-momentum-dismissβ Dismiss on velocity OR distance thresholdgesture-snap-pointsβ Use velocity-aware snap pointsgesture-interruptibleβ Make all gesture animations interruptiblegesture-scroll-drag-conflictβ Resolve scroll and drag gesture conflictsgesture-state-transientβ Use GestureState for transient drag stategesture-projected-landingβ Project gesture velocity for natural landing position
4. Spatial Transitions (HIGH)
spatial-matched-geometryβ Use matchedGeometryEffect for expand/collapse morphsspatial-zoom-navigationβ Use zoom navigation transition for collection detail (iOS 18)spatial-transition-originβ Anchor transitions to their trigger locationspatial-hero-shared-elementβ Share multiple element IDs for rich hero animationsspatial-sheet-morphβ Use matchedGeometryEffect for sheet presentationsspatial-tab-continuityβ Maintain spatial direction in tab transitions
5. Micro-interactions (HIGH)
micro-button-press-scaleβ Scale buttons to 0.97 on press for tactile feedbackmicro-haptic-pairingβ Pair every visual state change with haptic feedbackmicro-symbol-effectβ Use symbolEffect for SF Symbol animationsmicro-toggle-bounceβ Add bounce to toggle state changesmicro-long-press-fillβ Animate progressive fill for long press actionsmicro-loading-phaseβ Use repeating spring for organic loading states
6. Orchestration (HIGH)
orch-phase-animatorβ Use PhaseAnimator for multi-step sequencesorch-keyframe-animatorβ Use KeyframeAnimator for timeline-precise motionorch-stagger-childrenβ Stagger child elements for orchestrated revealsorch-coordinated-entranceβ Coordinate multi-element entrances with shared triggerorch-timeline-viewβ Use TimelineView for continuous repeating animations
7. Craft & Polish (HIGH)
craft-reduce-motionβ Respect accessibilityReduceMotion with crossfade fallbackcraft-blur-bridgeβ Use blur to bridge imperfect transition statescraft-drawing-groupβ Use drawingGroup() for Metal-backed complex animationscraft-geometry-groupβ Use geometryGroup() to isolate layout animation propagationcraft-transaction-debugβ Use Transaction to debug and override animation behavior
8. Content Motion (MEDIUM-HIGH)
content-numeric-textβ Use contentTransition(.numericText) for number changescontent-scroll-transitionβ Use scrollTransition for scroll-position effectscontent-visual-effectβ Use visualEffect for position-aware animationscontent-symbol-replaceβ Animate symbol replacement with contentTransitioncontent-text-rendererβ Use Text Renderer for character-level animation (iOS 18)
How to Use
Read individual reference files for detailed explanations with incorrect/correct code examples:
- Section definitions β Category structure and impact levels
- Rule template β Template for adding new rules
Reference Files
| File | Description |
|---|---|
| references/_sections.md | Category definitions and ordering |
| assets/templates/_template.md | Template for new rules |
| metadata.json | Version and reference information |
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.