swiftui-custom-layout

Community

Custom, animated SwiftUI container layouts

AuthorAutisticAF
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Provides a clear, reusable approach to arranging SwiftUI views in patterns that HStack, VStack, Grid and Lazy stacks cannot express, such as wrapping tag flows, radial arrangements, and animated layout transitions. It helps developers avoid misusing GeometryReader for layout and provides performance guidance for large numbers of subviews.

Core Features & Use Cases

  • Flow/Wrapping Layouts: Create tag or chip containers that wrap items to the next line when exceeding available width.
  • Radial and Circular Placement: Arrange child views on a circle or other polar layouts for visual components and charts.
  • Per-Subview Metadata: Use LayoutValueKey extensions to pass priorities and configuration from child views to the container.
  • Performance Caching: Implement makeCache/updateCache to avoid redundant measurements for many subviews.
  • Animated Layout Switching: Use AnyLayout and withAnimation to smoothly transition between different container types.
  • Adaptive Alternatives: Combine with ViewThatFits or AnyLayout to provide responsive fallbacks for constrained spaces.

Quick Start

Create a FlowLayout that wraps tag views and provide a short SwiftUI example demonstrating size measurement, placement, and caching.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: swiftui-custom-layout
Download link: https://github.com/AutisticAF/claude-code-apple-dev-plugin/archive/main.zip#swiftui-custom-layout

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.