ios-glass-buttons

Diagnose and fix hit targets in iOS SwiftUI controls using Liquid Glass.

Updated Feb 22, 2026
One-click install
npx skills add https://github.com/pyronaur/ngents --skill ios-glass-buttons
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ios-glass-buttons
Source: https://github.com/pyronaur/ngents/tree/main/docs/topics/apple/skills/ios-glass-buttons
Command: npx skills add https://github.com/pyronaur/ngents --skill ios-glass-buttons

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Guidance for diagnosing and fixing small or inconsistent hit targets in iOS SwiftUI controls that use Liquid Glass, ensuring taps are reliable and icons remain visible.

Core Features & Use Cases

  • Explicit hit target sizing: apply frame or padding to the button label to widen tap areas.
  • Define the tappable region with contentShape(Rectangle()) (or Capsule() for pill shapes) to align hit area with the intended target.
  • Apply glass effects after sizing and hit-testing to preserve hit area.
  • Patterns for grouped icon buttons: maintain uniform hit targets within a column or row.
  • Icon rendering guidance: maintain contrast and prevent icon disappearance when applying glass.

Quick Start

Apply explicit hit-target sizing and a content shape to a SwiftUI button, then verify the tappable area matches the visible icon.

Frequently Asked Questions about ios-glass-buttons

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

FAQPage Schema
Why are my SwiftUI Liquid Glass buttons hard to tap?

Liquid Glass effects in SwiftUI can shrink or misalign tap targets if applied before sizing. Fixing hit targets requires applying explicit frame or padding to the button label before rendering glass effects.

How do I fix small tap targets on iOS icon-only buttons using SwiftUI?

To fix small tap targets on iOS icon-only buttons, apply explicit frame or padding sizing to the button label and define the tappable region using contentShape(Rectangle()) to match the visible icon.

What is the best way to define hit-testing shapes for SwiftUI glass buttons?

The best way to define hit-testing shapes for SwiftUI glass buttons is using contentShape with Rectangle() for standard areas or Capsule() for pill shapes, ensuring the tap area aligns with the intended target.

How do I maintain uniform tap areas for grouped icon buttons in SwiftUI?

Maintain uniform tap areas for grouped icon buttons in SwiftUI by applying consistent frame or padding sizing across the row or column, then defining hit-testing shapes with contentShape before applying glass effects.

Why do my icons disappear when applying Liquid Glass effects in SwiftUI?

Icons disappear when Liquid Glass effects override or obscure rendering if applied before sizing. Apply glass effects after explicit hit target sizing and contentShape definition to preserve icon visibility and contrast.

Do I need contentShape to fix SwiftUI tap target issues?

Yes, contentShape is required to fix SwiftUI tap target issues because it explicitly defines the tappable region, ensuring the hit area matches the visible button label and meets accessibility sizing guidelines.