Skip to content

imodeveloper/dskit-swiftui

Repository files navigation

DSKit

iOS Swift Package Manager

DSKit

DSKit is a SwiftUI design system for building iOS interfaces from reusable views, design tokens, and appearance themes. The repo is organized for both developers and AI agents: generated docs connect every component and Explorer screen to source files, snapshot previews, examples, and real usage references.

Documentation

Use these entrypoints before guessing APIs or recreating patterns that already exist in the repo.

DSKit includes DSKitExplorer, a catalog app with 60+ ready-to-use screens that show complete SwiftUI flows in context. Start with the showcase when choosing a visual direction, use the screen catalog when you need complete screen examples, and use the component catalog when you need individual DSKit views with source, previews, examples, and usage references.

  • Showcase: visual overview of the main DSKitExplorer flows.
  • Screen catalog: generated full-screen examples with iPhone-framed snapshot previews and per-screen pages.
  • Views / Components: generated visual component catalog with snapshot previews and links to per-component pages.
  • Screen construction: how complete DSKit screens are assembled from containers, sections, rows, and cards.
  • Layout: hand-written layout and spacing guidance.
  • Appearance: hand-written appearance and theming guidance.
  • Documentation workflow: how generated docs are refreshed and what to edit.

Running DSKitExplorer

Open DSKitExplorer.xcodeproj, select the DSKitExplorer scheme, and run it on an iPhone simulator.

Start Here

  1. Add DSKit with Swift Package Manager:

    • Package URL: https://github.com/imodeveloper/dskit-swiftui.git
    • Select the app target that should use DSKit.
  2. Apply an appearance at the root of your app:

import SwiftUI
import DSKit

@main
struct DSKitDemoApp: App {
    var body: some Scene {
        WindowGroup {
            ContentView()
                .dsAppearance(RetroAppearance())
        }
    }
}
  1. Build screens with DSKit views and modifiers:
import SwiftUI
import DSKit

struct ContentView: View {
    var body: some View {
        DSVStack(alignment: .center) {
            DSText("Welcome to DSKit")
                .dsTextStyle(.title1)
                .dsPadding()
                .dsBackground(.primary)
            DSText("Design with ease")
                .dsPadding()
                .dsBackground(.secondary)
                .dsCornerRadius()
            DSButton(
                title: "Start Now",
                action: { print("Do something") }
            )
        }
        .dsScreen()
    }
}

In this example, DSVStack, DSText, and DSButton are combined with modifiers like dsPadding() and dsBackground().

Contributions and support

DSKit is developed completely in the open, and contributions are welcome.

Before changing DSKit, read the contribution guide, the workflow guide, and the generated component or screen page for the area you are changing. Generated docs are not edited by hand; update Swift source comments, Testable_* examples, snapshots, or the generator, then run cd Scripts && ./documentation_generator.sh.

This project does not come with GitHub Issues-based support. Users are encouraged to become active participants by fixing bugs they encounter or improving documentation wherever it is lacking.

If you wish to make a change, open a Pull Request, even if it just contains a draft of the changes you are planning or a test that reproduces an issue.

Hope you will enjoy using DSKit.

About

A design system with a collection of reusable components, guided by clear standards, that can be assembled together to build any number of applications.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages