Loading...
Loading...
Best practices and example-driven guidance for building SwiftUI views and components, including navigation hierarchies, custom view modifiers, and responsive layouts with stacks and grids. Use when creating or refactoring SwiftUI UI, designing tab architecture with TabView, composing screens with VStack/HStack, managing @State or @Binding, building declarative iOS interfaces, or needing component-specific patterns and examples.
npx skill4agent add prisma-labs-dev/apple-skills guide-swiftui-ui-patternsGuide Skill — This is an expert workflow/pattern guide, not API reference documentation. Originally from Dimillian/Skills by Thomas Ricouard. MIT License.
rg "TabView\("references/components-index.mdreferences/scroll-reveal.mdreferences/app-wiring.mdAppTabRouterPath@State@Binding@Observable@EnvironmentObservableObject@StateObject@ObservedObject@EnvironmentObject.taskreferences/async-state.md@Environmentreferences/app-wiring.md.sheet(item:).sheet(isPresented:)if letdismiss()onCancelonConfirm| Scenario | Preferred pattern |
|---|---|
| Local UI state owned by one view | |
| Child mutates parent-owned value state | |
| Root-owned reference model on iOS 17+ | |
Child reads or mutates an injected | Pass it explicitly as a stored property |
| Shared app service or configuration | |
| Legacy reference model on iOS 16 and earlier | |
references/navigationstack.mdreferences/sheets.mdreferences/deeplinks.mdreferences/app-wiring.mdreferences/async-state.md.task.task(id:)references/previews.md#Previewreferences/performance.mdbodyAnyView@EnvironmentObject@Environmentreferences/navigationstack.mdreferences/sheets.mdreferences/deeplinks.md.task.task(id:)references/async-state.mdreferences/previews.mdreferences/performance.md@StateViewBuilderreferences/components-index.mdreferences/<component>.mdreferences/components-index.md