dpearson2699/swift-ios-skills / skills/swiftui-layout-components
swiftui-layout-components
VerifiedBuild SwiftUI layouts using stacks, grids, lists, scroll views, forms, and controls. Covers VStack/HStack/ZStack, LazyVGrid/LazyHGrid, List with sections and swipe actions, ScrollView with ScrollPosition and scroll-driven reveal surfaces, Form with validation, Toggle/Picker/Slider, .searchable, and overlay patterns. Use when building data-driven layouts, collection views, paged detail reveals, settings screens, search interfaces, or transient overlay UI.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 11.5 KB |
| evals/evals.json | config | 4.9 KB |
| references/form.md | markdown | 3.0 KB |
| references/grids.md | markdown | 6.5 KB |
| references/list.md | markdown | 3.7 KB |
| references/scrollview.md | markdown | 9.1 KB |
evals/evals.json
View on GitHub{
"skill_name": "swiftui-layout-components",
"evals": [
{
"id": 1,
"prompt": "Review a SwiftUI Explore screen that uses a VStack of 500 media cards, a custom search field, and a floating toast. Recommend a modern iOS 26 layout approach without rewriting unrelated app architecture.",
"expected_output": "Focused layout guidance that chooses lazy containers, native search, and overlay patterns while staying out of navigation and state-architecture rewrites.",
"files": [],
"expectations": [
"Recommends a lazy container such as LazyVStack or LazyVGrid for the large card collection.",
"Mentions stable item identity for ForEach rather than array-index IDs.",
"Recommends native .searchable with debounced async work or .task(id:) for search.",
"Keeps transient toast guidance in overlay(alignment:) rather than embedding the toast in the main layout stack.",
"Does not introduce view-model architecture or navigation routing as the primary solution."
]
},
{
"id": 2,
"prompt": "A settings-heavy SwiftUI screen uses List sections and needs a jump-to-section control plus rows whose expanded descriptions animate smoothly. What layout guidance should I follow?",
"expected_output": "Explains the List scroll-target and dynamic row-height caveats, then recommends the appropriate List or ScrollView plus lazy-stack structure for the requirements.",
"files": [],
"expectations": [
"Distinguishes simple edge scrolling in List from reliable item or section jump-to-id behavior.",
"Recommends ScrollView plus LazyVStack with scrollTargetLayout for reliable item or section jump-to-id behavior.",
"Calls out dynamic List row-height snapping or jumping as a practical runtime gotcha.",
"Keeps the row-height caveat framed as layout guidance and does not turn the answer into a broad animation tutorial.",
"Preserves Form/List use for straightforward settings rows where built-in row semantics matter."
]
},
{
"id": 3,
"prompt": "I need a SwiftUI onboarding flow with full-screen modal routing, sheet detents, deep links into steps, and a few forms. Which parts should this layout skill own?",
"expected_output": "Clear boundary guidance that keeps forms and controls in this skill while handing modal routing, sheets, full-screen presentation policy, and deep links to swiftui-navigation.",
"files": [],
"expectations": [
"Identifies Form, Section, Toggle, Picker, Slider, TextField, and FocusState guidance as in-scope for this skill.",
"Hands full-screen presentation, sheet detents, modal routing, and deep links to the swiftui-navigation skill.",
"Does not provide detailed NavigationStack routing or deep-link implementation as if owned by this skill.",
"Keeps any layout advice concise and scoped to the form/control surfaces inside the onboarding flow."
]
},
{
"id": 4,
"prompt": "Design the layout behavior for an iOS 26 SwiftUI editor whose primary canvas pages vertically into a secondary detail surface. The scroll offset should progressively fade and scale the canvas, reveal a toolbar, and update an affordance. The current prototype also tracks three reveal booleans plus a duplicate DragGesture, fires haptics from per-frame geometry, and fights scrolling while zooming or cropping. Keep the answer within layout/component scope.",
"expected_output": "A modern scroll-driven reveal pattern that uses ScrollPosition and paging, derives one clamped normalized progress value through a narrow onScrollGeometryChange transform, drives all continuous effects from it, reserves visibility/settled callbacks for deduplicated discrete effects, disables scrolling during conflicting interactions, and avoids geometry feedback loops and broad per-frame invalidation.",
"files": [],
"expectations": [
"Prefers `ScrollPosition` for the iOS 26 baseline without falsely claiming `ScrollViewReader` is deprecated.",
"Derives one clamped normalized progress value from scroll offset with a small `Equatable` `onScrollGeometryChange` transform.",
"Drives opacity, offset, scale, blur, toolbar treatment, and affordances from the shared progress rather than duplicated booleans.",
"Removes the parallel drag-gesture state machine and keeps the scroll view as the interaction source of truth.",
"Uses visibility callbacks only for discrete threshold effects and does not treat them as continuous progress or guaranteed settled paging.",
"Disables scrolling during conflicting zoom or crop interactions with `.scrollDisabled`.",
"Keeps per-frame invalidation in a narrow presentation subtree and avoids publishing raw geometry into broad app state.",
"Prevents progress-driven layout from changing the geometry used to calculate progress and stays within layout/component scope."
]
}
]
}
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation). | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK). | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |