gestures

Implement standard and advanced UI gesture patterns in SwiftUI.

32|10|Updated Feb 21, 2026
One-click install
npx skills add https://github.com/moasq/nanowave --skill gestures
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gestures
Source: https://github.com/moasq/nanowave/tree/main/internal/orchestration/skills/ui/gestures
Command: npx skills add https://github.com/moasq/nanowave --skill gestures

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides clear guidance and code examples for implementing various user interface gesture interactions in SwiftUI, ensuring a smooth and intuitive user experience.

Core Features & Use Cases

  • Gesture Mapping: Understand which SwiftUI API corresponds to common gestures like tap, swipe, drag, and pinch.
  • Best Practices: Learn when to use Button vs. .onTapGesture, and how to structure swipe actions and context menus effectively.
  • Advanced Interactions: Implement gesture priority, simultaneous recognition, and integrate haptic feedback for enhanced user feedback.
  • Use Case: When designing a photo gallery app, use this Skill to implement pinch-to-zoom for images and drag-and-drop for reordering.

Quick Start

Use the gestures skill to implement a swipe-to-delete action on a list row.

Frequently Asked Questions about gestures

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

FAQPage Schema
How do I implement pinch-to-zoom and drag gestures in SwiftUI?

You can implement pinch-to-zoom and drag gestures in SwiftUI by using the MagnificationGesture and DragGesture APIs. This allows you to build interactive photo galleries and support drag-and-drop reordering for a smooth user experience.

When should I use a SwiftUI Button versus onTapGesture for interactions?

Use SwiftUI Button for standard interactive controls to ensure proper accessibility, and use onTapGesture when you need custom touch handling on non-control views. Best practices include structuring swipe actions and context menus for intuitive interactions.

How do I manage gesture priority and simultaneous recognition in SwiftUI?

SwiftUI gesture priority and simultaneous recognition are managed using gesture modifiers like highPriorityGesture and simultaneousGesture. This ensures multiple gestures like drag and pinch work together without canceling each other out during complex interactions.

What is the best way to add haptic feedback to UI gestures in SwiftUI?

The best way to add haptic feedback to UI gestures in SwiftUI is to pair gesture state changes with UIImpactFeedbackGenerator. This provides physical confirmation to users during interactions like long presses or swipe actions.

How do I add a confirmation dialog for destructive swipe actions in SwiftUI?

Add a confirmation dialog for destructive swipe actions in SwiftUI by triggering the dialog from the swipe action's closure. This ensures user consent before deleting data, maintaining a safe and intuitive user experience.

Does SwiftUI support pull-to-refresh and scroll gestures out of the box?

SwiftUI supports pull-to-refresh and scroll gestures out of the box using the refreshable modifier and standard scroll views. You can easily implement these to provide standard list and content navigation interactions.