Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsCommunityBlog
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Swiftui Layout Components

ASecurity

Build SwiftUI stacks, grids, lists, scroll views, forms, controls, search interfaces, and overlays. Use for ordinary layout and container decisions; route cross-size adaptation, clipping or overlap diagnosis, state architecture, navigation policy, animation choreography, and runtime profiling to dedicated skills.

3 stars
0 votes
0 copies
0 views
Added 9/28/2026
developmentswiftexpressapiperformancedocumentation

Works with

cliapi

Security Analysis

A100/100

Scanned 9/28/2026

Install to Claude Code

$npx -y skills add thiennc-tesoglobal/ios-skills --skill swiftui-layout-components --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Swiftui Layout Components?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Swiftui Layout Components
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/thiennc-tesoglobal-swiftui-layout-components/badge)](https://www.skillsdirectory.com/skills/thiennc-tesoglobal-swiftui-layout-components)

More formats (shields.io, HTML) on the badges page.

Files
SKILL.md
---
name: swiftui-layout-components
description: "Build SwiftUI stacks, grids, lists, scroll views, forms, controls, search interfaces, and overlays. Use for ordinary layout and container decisions; route cross-size adaptation, clipping or overlap diagnosis, state architecture, navigation policy, animation choreography, and runtime profiling to dedicated skills."
---

# SwiftUI Layout and Components

Choose containers and controls that preserve identity, adapt across sizes, and remain accessible without unnecessary custom layout code.

## Contents

- [Scope and Compatibility](#scope-and-compatibility)
- [Container Selection](#container-selection)
- [Identity and Laziness](#identity-and-laziness)
- [Lists, Forms, and Controls](#lists-forms-and-controls)
- [Search and Overlays](#search-and-overlays)
- [Scroll-Driven Effects](#scroll-driven-effects)
- [Common Mistakes](#common-mistakes)
- [Review Checklist](#review-checklist)
- [References](#references)

## Scope and Compatibility

This skill owns ordinary stacks, grids, lists, scroll views, forms, controls, search UI, and overlays. Route clipping, unintended overlap, keyboard obstruction, and adaptation across window sizes, orientation, Dynamic Type, or localization to `swiftui-responsive-layout`. Route state ownership to `swiftui-patterns`, navigation and modal policy to `swiftui-navigation`, gestures to `swiftui-gestures`, motion to `swiftui-animation`, and measured performance problems to `swiftui-performance`.

Inspect deployment target, Swift mode, and SDK before using versioned modifiers. Preserve project settings unless the user requests a change; gate newer APIs and verify them in SDK headers or primary Apple documentation.

## Container Selection

| Need | Start with |
|---|---|
| Small fixed arrangement | `VStack`, `HStack`, or `ZStack` |
| Large one-axis collection | `ScrollView` with `LazyVStack` or `LazyHStack` |
| Adaptive two-dimensional collection | `LazyVGrid` or `LazyHGrid` |
| Platform list behavior, sections, editing, swipe actions | `List` |
| Structured settings or data entry | `Form` |
| Custom geometry-based layout | `Layout` protocol or focused geometry APIs after standard containers are insufficient |

Do not choose a container from row count alone. Consider editing behavior, selection, section semantics, separators, custom backgrounds, nested interaction, and whether cells need platform list behavior.

Read the relevant reference before implementing a substantial container:

- grids: [references/grids.md](references/grids.md)
- lists and sections: [references/list.md](references/list.md)
- scroll views and lazy stacks: [references/scrollview.md](references/scrollview.md)
- forms and validation: [references/form.md](references/form.md)

## Identity and Laziness

Dynamic items need identity that survives insertion, deletion, sorting, and filtering. Prefer model identity. Index identity is acceptable only when position is intentionally the identity of a fixed collection.

Use lazy containers for collections large enough that eager construction is material. Do not wrap every small stack in a lazy container. Keep expensive filtering, sorting, formatting, and image work outside per-frame layout closures.

Avoid `GeometryReader` inside repeated lazy cells when a focused API such as `containerRelativeFrame`, `onGeometryChange`, preferences, or a custom `Layout` expresses the requirement more narrowly.

## Lists, Forms, and Controls

Use `List` when system editing, selection, swipe actions, sections, or platform row behavior are desired. Use `ScrollView` plus a lazy stack when the visual treatment or interaction model substantially diverges from `List`.

Use `Form` for structured input and settings, but keep validation and persistence policy outside layout code. Choose control styles based on option count and context; segmented controls are poor fits for many or long options.

Interactive rows need an adequate hit target and a meaningful `contentShape`. Preserve Dynamic Type and allow layouts to reflow instead of truncating essential content.

## Search and Overlays

Use `.searchable` for platform search presentation. Keep query state with the feature owner and use `.task(id:)` only when search work is tied to view lifetime; route debounce, clocks, and cancellation mechanics to `swift-concurrency`.

Use overlays for transient UI that should not affect layout. Give banners and toasts a clear alignment, transition, accessibility announcement, and dismissal owner. Route sheets, full-screen covers, detents, and route-driven presentation to `swiftui-navigation`.

## Scroll-Driven Effects

Drive continuous effects from one normalized progress value and keep geometry observation in the narrowest subtree possible. Avoid parallel booleans that can disagree. Do not combine competing same-axis scroll and drag gestures without an explicit interaction policy.

Route Liquid Glass scroll-edge styling to `swiftui-liquid-glass` and detailed animation curves/transitions to `swiftui-animation`.

## Common Mistakes

- Setting hardcoded frame heights inside scrollable containers, causing clipping on smaller screens.
- Nesting two `ScrollView` instances on the same scroll axis without an explicit coordinate space.
- Using `GeometryReader` inside every cell of a lazy grid or list, causing layout thrashing.
- Forcing a `List` into a static container when a `VStack` or `Grid` better matches the semantics.
- Omitting `.contentShape(Rectangle())` on rows with transparent backgrounds, making taps fail.

## Review Checklist

- [ ] Container choice matches behavior, not just appearance
- [ ] Dynamic collections use stable semantic identity
- [ ] Laziness is used where collection size justifies it
- [ ] No expensive work runs in repeated layout or geometry callbacks
- [ ] Forms and controls remain usable at accessibility text sizes
- [ ] Search work has clear cancellation and empty-query behavior
- [ ] Overlays have one presentation/dismissal owner and do not unintentionally block interaction
- [ ] Scroll-driven state has one source of truth
- [ ] Layout adapts to size class, orientation, and localization where required
- [ ] Versioned APIs match the project deployment target

## References

- [Grid patterns](references/grids.md)
- [List and section patterns](references/list.md)
- [ScrollView and lazy stack patterns](references/scrollview.md)
- [Form patterns](references/form.md)

Attribution

thiennc-tesoglobalthiennc-tesoglobal
View sourceMore from thiennc-tesoglobal →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Browser Extension Developer

Use this skill when developing or maintaining browser extension code in the `browser/` directory, including Chrome/Firefox/Edge compatibility, content scripts, background scripts, or i18n updates.

284972 votes

Seo Optimizer

SEO optimization with keyword analysis, readability assessment, technical validation, content quality. Use for search rankings, blog posts, content audits, or encountering keyword density, readability scores, meta tags, schema markup errors.

2222 votes

Google Official Seo Guide

Official Google SEO guide covering search optimization, best practices, Search Console, crawling, indexing, and improving website search visibility based on official Google documentation

1862 votes

Tanstack Start

Build a full-stack TanStack Start app on Cloudflare Workers from scratch — SSR, file-based routing, server functions, D1+Drizzle, better-auth, Tailwind v4+shadcn/ui. Use whenever the user mentions TanStack Start, asks to scaffold a full-stack Cloudflare app with SSR, wants an SSR dashboard, or asks for a React 19 + Cloudflare Workers app with file-based routing and server functions — even if they don't name TanStack Start specifically. No template repo — Claude generates every file fresh per ...

10311 votes

Pentest

PTES-aligned adversarial security audit for backend, frontend, and mobile applications. Produces a CVSS-scored Hacker Report with verified PoCs and phased remediation.

5491 votes
View all in development →