Docs

Getting Started

Get S0 components into your SwiftUI project in under a minute.

Prerequisites

  • Xcode 15 or later
  • iOS 17+ / macOS 14+ deployment target
  • A SwiftUI project

1. Install the S0 CLI

Clone or download the S0 CLI tool:

# Using Homebrew
brew install s0-dev/tap/s0

# Or clone and build
git clone https://github.com/s0-dev/s0-cli.git
cd s0-cli && swift build -c release

2. Initialize your theme

Run s0 init in your Xcode project root. This creates the S0Theme.swift file containing all design tokens.

cd MyApp
s0 init

3. Add components

Use s0 add to copy components into your project. Dependencies are resolved automatically.

# Add a single component
s0 add button

# Add multiple components
s0 add card input checkbox

# Add all components
s0 add --all

4. Use in your views

Every component lives under the S0 namespace:

import SwiftUI

struct ContentView: View {
    @State private var email = ""

    var body: some View {
        VStack(spacing: 16) {
            S0.Input("Email", text: $email, placeholder: "you@example.com")

            S0.Button("Continue", action: {
                print("Submitted: \(email)")
            })
        }
        .padding()
    }
}