ios-animations
34
总安装量
2
周安装量
#10956
全站排名
安装命令
npx skills add https://github.com/pproenca/dot-skills --skill ios-animations
Agent 安装分布
claude-code
2
amp
1
opencode
1
kimi-cli
1
codex
1
github-copilot
1
Skill 文档
dot-skills iOS SwiftUI Animations Best Practices
Comprehensive animation guidelines for SwiftUI apps, designed to produce fluid, native-feeling motion that matches Apple’s first-party quality. Contains 47 rules across 8 categories, prioritized by impact â from spring physics fundamentals to orchestration polish.
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
- Reviewing animation code for performance and accessibility
Rule Categories by Priority
| Priority | Category | Impact | Prefix | Rules |
|---|---|---|---|---|
| 1 | Spring Physics | CRITICAL | spring- |
7 |
| 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 | Content Motion | MEDIUM-HIGH | content- |
5 |
| 7 | Orchestration | MEDIUM | orch- |
5 |
| 8 | Craft & Polish | MEDIUM | craft- |
5 |
Quick Reference
1. Spring Physics (CRITICAL)
spring-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. 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)
7. Orchestration (MEDIUM)
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
8. Craft & Polish (MEDIUM)
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
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 |