axiom-swiftui-layout-ref

Reference SwiftUI adaptive layout APIs for responsive interfaces.

Updated Dec 3, 2025
One-click install
npx skills add https://github.com/tuliopc23/flying-dutchman-app --skill axiom-swiftui-layout-ref
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: axiom-swiftui-layout-ref
Source: https://github.com/tuliopc23/flying-dutchman-app/tree/main/.claude/skills/axiom-swiftui-layout-ref
Command: npx skills add https://github.com/tuliopc23/flying-dutchman-app --skill axiom-swiftui-layout-ref

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides a comprehensive reference for SwiftUI's adaptive layout APIs, enabling developers to build flexible and responsive user interfaces across different screen sizes and device states.

Core Features & Use Cases

  • Adaptive Layout Tools: Covers ViewThatFits, AnyLayout, Layout Protocol, onGeometryChange, GeometryReader, size classes, and iOS window APIs.
  • Custom Layouts: Learn to create custom layout containers using the Layout protocol.
  • Use Case: When designing a complex UI element that needs to adapt its arrangement based on available space (e.g., a dashboard widget that rearranges its content on smaller screens), this reference guides you through the most efficient SwiftUI tools.

Quick Start

Show me how to use ViewThatFits to create a layout that adapts to available horizontal space.

Frequently Asked Questions about axiom-swiftui-layout-ref

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

FAQPage Schema
How do I create an adaptive SwiftUI layout that rearranges based on available screen space?

To build an adaptive SwiftUI layout, you can use `ViewThatFits` to automatically select a layout that fits the available horizontal space, or switch between layout types dynamically using `AnyLayout` for responsive interface arrangements.

What is the best way to build custom layout containers in SwiftUI?

Building custom layout containers in SwiftUI is best achieved using the `Layout` protocol, which allows you to define precise positioning and sizing rules for your views, enabling complex adaptive UI arrangements.

How does GeometryReader work for building responsive user interfaces?

`GeometryReader` works by providing access to the size and position of its parent view, allowing you to dynamically adjust child view frames and create responsive user interfaces across varying screen dimensions and device states.

When should I use ViewThatFits instead of size classes for adaptive UI in iOS?

Use `ViewThatFits` for fine-grained, space-based content adaptation when you have multiple specific layout variations, whereas size classes are better for broad, high-level interface changes across different device orientations or compact environments.

Can I use the Layout protocol with older iOS versions?

The `Layout` protocol requires iOS 16 or later, meaning it cannot be used to create custom layout containers if your application needs to support older iOS versions.

Why does my SwiftUI dashboard widget overlap content on smaller screens?

Content overlap on smaller screens occurs when layouts are not adaptive; you can resolve this by using `ViewThatFits` to select alternative arrangements or `onGeometryChange` to dynamically update your layout based on available dimensions.