What problem does it solve?
SwiftUI controls render and behave differently on macOS compared to iOS, leading to non-native UI, broken accessibility, and unexpected rendering when using cross-platform defaults or overlooking macOS-only controls like FontPicker and NSPathControl. Developers often waste time troubleshooting platform-specific quirks such as segmented picker truncation, NSViewRepresentable zero-height collapse, and missing AppKit interop patterns.
Core Features & Use Cases
- Comprehensive control style reference: Covers all macOS-specific SwiftUI control styles including Button (bordered, borderedProminent, plain, link, accessoryBar), Picker (segmented, menu, radioGroup, inline), Toggle (switch, checkbox), Slider, Stepper, ColorPicker, FontPicker, ControlGroup, and control sizing.
- AppKit interop recipes: Provides working NSViewRepresentable wrappers for AppKit-only controls like NSPathControl and NSLevelIndicator, plus guidance on avoiding common Auto Layout and sizing pitfalls.
- Real-world use case: For example, when building a macOS document-based app's preferences panel, use this skill to implement a native radio group picker for theme selection, an accessory bar button style for metadata actions, and a FontPicker for user font customization that matches macOS design guidelines.
Quick Start
Use the swiftui-macos-controls skill to add a native macOS toolbar with a text formatting ControlGroup and a segmented picker for view mode selection to your SwiftUI app.