swiftui-layout-components

Guide SwiftUI developers in selecting layout primitives for iOS screens.

Updated May 10, 2026
One-click install
npx skills add https://github.com/FelixRauch/medat-figuren --skill swiftui-layout-components-felixrauch
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: swiftui-layout-components
Source: https://github.com/FelixRauch/medat-figuren/tree/main/.agents/skills/swiftui-layout-components
Command: npx skills add https://github.com/FelixRauch/medat-figuren --skill swiftui-layout-components-felixrauch

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you avoid brittle, slow, and inconsistent SwiftUI UIs by providing battle-tested layout and component patterns for iOS apps.

Core Features & Use Cases

  • Choose the right container: when to use VStack/HStack/ZStack vs LazyVStack/LazyHStack and when to use LazyVGrid/LazyHGrid for dense visual selection.
  • Build reliable lists and forms: consistent List sections, row styling, scroll-to-position behavior, and Form patterns with validation and focus handling.
  • Implement search and transient UI cleanly: native .searchable patterns with scopes and debounced tasks, plus overlay patterns for toasts/banners without breaking layout.

Quick Start

Ask for a SwiftUI screen plan that uses List for settings, LazyVGrid for selectable items, ScrollPosition for scroll-to-top behavior, and a searchable list with debounced results.

Frequently Asked Questions about swiftui-layout-components

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

FAQPage Schema
When should I use LazyVStack instead of VStack in SwiftUI layouts?

Use LazyVStack instead of VStack in SwiftUI layouts when rendering large or dynamic collections to maintain scroll performance, applying stable identity patterns to prevent unnecessary view recomputation across iOS 17–26 screens.

How do I implement a searchable list with debounced results in SwiftUI?

Implement a searchable list with debounced results in SwiftUI by applying the native .searchable modifier with scopes and debounced tasks, filtering query inputs cleanly without blocking the main thread during dynamic data fetching.

What is the best way to manage scroll-to-top behavior in a SwiftUI List?

Manage scroll-to-top behavior in a SwiftUI List by utilizing the ScrollPosition API to programmatically track and control scroll offsets, ensuring reliable scroll-to-position actions across dynamic content updates.

How do I present overlay banners or toasts without breaking SwiftUI layouts?

Present overlay banners or toasts without breaking SwiftUI layouts by applying overlay presentation best practices, layering transient UI elements cleanly over existing stacks and grids without mutating the underlying view hierarchy.

When do I need to use LazyVGrid for dense visual selection in iOS apps?

Use LazyVGrid for dense visual selection in iOS apps when displaying selectable items in a multi-column matrix, leveraging lazy rendering performance guardrails to keep large grid collections responsive.

Can I build SwiftUI forms with built-in validation and focus handling?

Build SwiftUI forms with built-in validation and focus handling by using consistent Form patterns designed for iOS, structuring sections and row styling to support reliable input management and validation states.