swiftui-animation

Implement advanced SwiftUI animations, transitions, and Metal shader integration.

8|2|Updated Dec 29, 2025
One-click install
npx skills add https://github.com/hack-dance/hack --skill swiftui-animation-hack-dance
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: swiftui-animation
Source: https://github.com/hack-dance/hack/tree/main/.agents/skills/swiftui-animation
Command: npx skills add https://github.com/hack-dance/hack --skill swiftui-animation-hack-dance

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This skill provides comprehensive guidance for implementing advanced SwiftUI animations, transitions, matched geometry effects, and Metal shader integration, enabling developers to create visually engaging and performant user interfaces.

Core Features & Use Cases

  • Advanced Animation Techniques: Learn about explicit animations, spring presets, PhaseAnimator, and KeyframeAnimator for complex motion sequences.
  • View Transitions & Hero Animations: Implement seamless view insertions, removals, and hero animations using matchedGeometryEffect.
  • GPU-Accelerated Effects: Integrate Metal shaders for custom visual effects and performance-intensive graphics.
  • Use Case: Building a photo-sharing app where tapping a thumbnail smoothly expands it into a full-screen view with a parallax effect.

Quick Start

Use the swiftui-animation skill to implement a spring animation for a view's opacity change.

Frequently Asked Questions about swiftui-animation

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement matched geometry effects for hero animations in SwiftUI?

Matched geometry effects in SwiftUI synchronize view positions across transitions to create seamless hero animations. You use matchedGeometryEffect to smoothly expand elements like thumbnails into full-screen views with coordinated spatial transitions.

What is the difference between PhaseAnimator and KeyframeAnimator in SwiftUI?

PhaseAnimator in SwiftUI drives complex motion sequences through discrete phase changes, while KeyframeAnimator interpolates specific values over time for fine-grained control. Both enable advanced animations beyond basic spring presets.

Can I integrate Metal shaders with SwiftUI for GPU-accelerated effects?

You can integrate Metal shaders with SwiftUI to create GPU-accelerated custom visual effects. This approach enables performant graphics processing for dynamic interfaces requiring complex, computation-heavy rendering.

How do I create custom spring animations and animation curves in SwiftUI?

Custom spring animations and animation curves in SwiftUI are created using explicit animation modifiers and spring presets. You define response, damping, and blend parameters to achieve precise motion physics for view transitions.

Does this SwiftUI animation guidance apply to macOS development as well as iOS?

This SwiftUI animation guidance applies to both iOS and macOS development. The techniques for transitions, matched geometry effects, and Metal shader integration support building dynamic interfaces across Apple platforms.

What's the best way to handle view insertions and removals with SwiftUI transitions?

The best way to handle view insertions and removals in SwiftUI is using transition modifiers combined with explicit animations. This approach ensures smooth visual continuity when elements dynamically appear or disappear from the interface.