Skip to content

Repository files navigation

LumiKit

LumiKit

CI Swift Versions Platforms License

A UIKit design system and component kit for iOS 18+, iPadOS, and Mac Catalyst, written in Swift 6.2: a value-type theme that re-renders live, a Style struct on every component, 60+ components and controls, a photo module, debug tooling, and Foundation utilities. Strings ship in English, Spanish, Simplified Chinese, and Traditional Chinese.

Products

Product Depends on What it holds
LumiKitCore Foundation LMKLogger, LMKDate and LMKDateFormat, LMKFormat, LMKFile, LMKConcurrency, LMKURLValidator, calendar day and selection types, string and collection extensions
LumiKitUI Core, SnapKit Tokens and the theme, styles, components, controls, lists, navigation, calendar, detail cards, alerts, toasts, share sheet, haptics, animation, utilities, UIKit extensions
LumiKitPhoto Core, UI Photo browser, photo grid, crop editor, pick-and-crop coordinator, share preview, LMKPhotoMetadata
LumiKitDebug Core, UI LMKNetworkLogger (URLProtocol capture with redaction) and the request inspector; DEBUG builds only
LumiKitLottie UI, Lottie LMKLottieRefreshControl with its bundled ring animation

Link LumiKitPhoto only where you show photos, and LumiKitDebug only in debug builds.

Screenshots

Design System and Controls Components Feedback and Overlays Media and Extensions
Design System and Controls Components Feedback and Overlays Media and Extensions

Requirements

Swift 6.2 or later (Xcode 26 or Xcode 27), iOS 18 / Mac Catalyst 18 as the floor (LumiKitCore and LumiKitDebug also build for macOS 15). iOS 26 features (Liquid Glass, concentric corners, scroll-edge effects, tab bar minimize, and more) are adopted behind #available with same-API fallbacks, so callers never gate. Details in docs/PLATFORM.md.

Installation

dependencies: [
    .package(url: "https://github.com/Luminoid/LumiKit.git", from: "1.0.0"),
],
targets: [
    .target(name: "MyApp", dependencies: [
        .product(name: "LumiKitUI", package: "LumiKit"),
        .product(name: "LumiKitPhoto", package: "LumiKit"),   // optional
        .product(name: "LumiKitLottie", package: "LumiKit"),  // optional
    ]),
]

Upgrading from 0.x: read docs/MIGRATION-1.0.md and run Scripts/migrate-1.0.sh <your-app> --dry-run.

Quick start

import LumiKitUI

// 1. A theme is a value. Override only what differs; apply it at launch or any time later.
extension LMKTheme {
    static let myApp = LMKTheme(colors: LMKColorTheme(primary: .systemIndigo, secondary: .systemTeal))
}
LMKTheme.apply(.myApp)

// 2. Tokens are dynamic: every LMKColor re-resolves on theme, dark mode, and contrast changes.
view.backgroundColor = LMKColor.backgroundPrimary
let title = UILabel.lmk_make(.h2, text: "Hello")

// 3. Components take a Style; nil fields fall back to the theme.
let save = LMKButton(title: "Save", style: .filled(.primary)) { print("saved") }
let chip = LMKChipView(text: "Outdoor", style: .outlined.tint(.systemGreen))
chip.onTap = { chip.isSelected.toggle() }

// 4. Presenters end in `present(from:)`; installed views end in `show(in:)`.
LMKToast.show(.success, "Saved", in: self)
LMKAlert.presentDeleteConfirmation(from: self, itemName: "Photo", onConfirm: { delete() })

App-wide defaults for any component live on the theme (theme.button.variant = .tinted), per-instance tweaks on style, and anything the Style does not cover in a didApplyStyle hook that re-runs on every theme change.

Example app

Example/ is a catalog of 68 pages in 12 sections (Foundations, Buttons & Controls, Text Input & Forms, Labels & Indicators, Cards & Lists, Dates, Navigation, Feedback & Status, Sheets & Panels, Photos & Media, Utilities, Debug), with search and a live theme switcher. Generate it with XcodeGen:

cd Example && xcodegen generate && open LumiKitExample.xcodeproj

It doubles as the accessibility test bed: -lmk-audit-all -lmk-config <name> -lmk-screenshots <dir> walks every page, audits truncation, clipping, overlap, 44pt targets, labels, WCAG contrast, and fixed fonts, and writes a screenshot per page; -lmk-rtl and -lmk-theme <name> cover right-to-left and a second theme.

Documentation

API reference on the Swift Package Index: LumiKitCore, LumiKitUI, LumiKitPhoto, LumiKitDebug, LumiKitLottie. make docs builds the same archives locally. The LumiKitUI catalog carries the guides: Getting Started, Theming, Styling, Components, Controls, Extensions, Localization, Platform Support, and Migrating to 1.0.

Build and test

brew bundle            # swiftlint, swiftformat, xcodegen
make setup-hooks       # pre-commit lint + format
make check             # SwiftLint --strict, SwiftFormat --lint
make build             # iOS Simulator          make build-catalyst   # Mac Catalyst
make test              # iOS Simulator          make test-filter FILTER=LumiKitUITests/LMKButtonTests
make example           # regenerate + build     make docs             # DocC archives
make migrate CONSUMER=../MyApp ARGS=--dry-run

UIKit targets need the simulator; make build-host builds LumiKitCore and LumiKitDebug natively on macOS. CI runs the same steps with warnings as errors.

Naming

Public types carry the LMK prefix; extension members on UIKit and Foundation types carry lmk_. Namespaces are subject nouns (LMKAnimation, LMKImage, LMKAlert), view controllers end in ViewController, callbacks are on<Event> closures, presenters use present(from:) and show(in:), every component has a nested Style and Strings. The full rule set is in CONTRIBUTING.md.

Built with LumiKit

App Description
Plantfolio Plus Plant care, watering schedules, collections, and photos for iOS, iPadOS, and Mac
Petfolio Pet care, health tracking, vet visits, food inventory for iOS, iPadOS, and Mac
TripDays Collaborative travel planner: day-by-day itineraries, maps, shared trips over iCloud, and expense splitting for iOS, iPadOS, and Mac
Metamer Color-vision camera for iOS: CVD simulation, daltonize filters, true-color naming, and an Ishihara plate generator

Related projects

  • Monolith: CLI that scaffolds iOS apps, Swift Packages, and Swift CLIs, with LumiKit wiring built in
  • Everything else at luminoid.dev

License and changelog

MIT, see LICENSE. Release history in CHANGELOG.md; security policy in SECURITY.md.

About

A modular Swift package providing design tokens, themeable UI components, and utilities for iOS, iPadOS, and Mac Catalyst apps. Built with Swift 6.2 strict concurrency, UIKit + SnapKit.

Topics

Resources

Contributing

Security policy

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages