The SwiftUI Ergonomics Layer Apple Didn’t Ship
Writing modern user interfaces in native SwiftUI is fast, but real-world production applications frequently encounter ergonomic friction: repetitive modifier stacks, custom keyboard dismissal code, and fragmented layout calculations scattered across view bodies.
SxnnyErgo (v2.0.0) exists to close these specific, well-known gaps in native SwiftUI. It is an authored ergonomics layer: a curated set of extensions, structural layouts, view modifiers, and polished components that cut call-site friction so you write less boilerplate and more of your app’s true view logic.
“Ergonomics first: less boilerplate, more expressive SwiftUI, on every Apple platform.”
Core Design Principles
Every public API in SxnnyErgo earns its place by adhering to three non-negotiable principles:
- Ergonomics First: Every function and modifier exists specifically to reduce cognitive load and ceremony at the call site.
- Composability: Small, focused APIs that combine naturally with native SwiftUI views instead of wrapping around them.
- Zero Visual Imposition: SxnnyErgo imposes no colors, fonts, or arbitrary spacing constants on your application — every API respects your app’s visual decisions.
The Four Architecture Domains
Every public symbol in SxnnyErgo belongs strictly to one of four domains:
- Extensions: Ergonomic extensions on standard SwiftUI and Swift types, including
Array,Binding,Collection,Color, async/lifecycle/visualViewextensions,Image, and@Adaptive. - Layout: Structural view containers that eliminate geometry boilerplate, including
FlowLayout,EqualSizeLayout,BreakpointLayout,ModalOverlay, andResizableSplitView. - Modifiers: Focused view behaviors such as
dismissesKeyboardOnTap(),minimumTappableFrame(),accessibleAnimation(),autoContrastForeground(), andDynamicTypePreviewGrid. - Components: High-frequency interface primitives including
IconButton,RoundedProminentButtonStyle,Badge,TokenView, andAnimatedNumericText.
Multi-Platform Apple Support
SxnnyErgo is built as a pure Swift Package supporting modern Apple platforms with native Swift 6.0+ concurrency and strict type safety:
- iOS: Version 15.0 and later
- macOS: Version 12.0 and later
- tvOS: Version 15.0 and later
- watchOS: Version 8.0 and later
- visionOS: Version 1.0 and later
