Skip to content
SxnnyErgo icon

SxnnyErgo

SwiftUI view modifiers, layouts, and utilities that follow native system semantics.

SxnnyErgo · Interface & Runtime
LIBRARIES
spm://sxnnyside-project/sxnnyergo/v2.0.0
 4-DOMAIN ARCHITECTURE
DOMAIN 01

Extensions

Array, Binding, View, @Adaptive

DOMAIN 02

Layout

FlowLayout, BreakpointLayout, ResizableSplitView

DOMAIN 03

Modifiers

dismissesKeyboardOnTap(), autoContrastForeground()

DOMAIN 04

Components

IconButton, RoundedProminentButtonStyle, Badge

SWIFTUI ERGONOMIC CHAIN
import SwiftUI
import SxnnyErgo

struct CardView: View {
    @State private var query = ""

    var body: some View {
        VStack(spacing: 16) {
            TextField("Search", text: $query)
                .dismissesKeyboardOnTap()

            Button("Explore") { }
                .buttonStyle(.roundedProminent())
        }
        .padding()
        .cardStyle()
    }
}
SxnnyErgo inspection and runtime surface within active development workflows.

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/visual View extensions, Image, and @Adaptive.
  • Layout: Structural view containers that eliminate geometry boilerplate, including FlowLayout, EqualSizeLayout, BreakpointLayout, ModalOverlay, and ResizableSplitView.
  • Modifiers: Focused view behaviors such as dismissesKeyboardOnTap(), minimumTappableFrame(), accessibleAnimation(), autoContrastForeground(), and DynamicTypePreviewGrid.
  • Components: High-frequency interface primitives including IconButton, RoundedProminentButtonStyle, Badge, TokenView, and AnimatedNumericText.

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
OFFICIAL DISTRIBUTION

Availability Ecosystem

SxnnyErgo is published and available across the following development environments.

SOURCE CODE

GitHub Repository

View Repository