Documentation
SwiftTUI documentation
Organized by what you're doing: getting started, building your interface, charting data, and running the same app on every host. The module-by-module API reference is at the end.
Start here
Build your interface
The authoring surface is SwiftUI-shaped: views, state, focus, and layout guides from the SwiftTUIViews catalog.
Charts
Sparklines, bar and line charts, heatmaps, meters, and calendar views ship separately as swift-tui-charts, composed on the same view surface.
Run it everywhere
One authored app; hosts for the terminal, the browser, Android, and native SwiftUI. Guides from the SwiftTUIRuntime catalog.
Concepts and background
API reference by module
The combined DocC archive documents each module. Most app code touches only the first row.
What you import
- SwiftTUI — the batteries-included app product
- SwiftTUIViews — views, controls, layout, state, focus
- SwiftTUIRuntime — scenes, run loop, host integration
- SwiftTUICharts — charts and compact metrics
Hosts and opt-in products
- SwiftTUICLI — terminal-only runner
- SwiftTUIWebHostCLI — terminal runner with --web
- SwiftTUIWebHost — localhost browser host
- SwiftTUIWASI — WASI and browser builds
- SwiftTUIAndroidHost — Android embedding
- SwiftTUITerminal — embedded terminal panes
- SwiftTUIAnimatedImage — animated GIF and image views
- SwiftTUIProfiling — opt-in profiling and diagnostics
- SwiftUIHost — native SwiftUI embedding (separate package)
Vocabulary you use, modules you don't import
- SwiftTUIPrimitives — geometry, color, style, animation math
- SwiftTUIGraph — reconciliation engine; PreferenceKey, DynamicProperty
- SwiftTUICore — the render engine's frame pipeline
- SwiftTUIArguments — SwiftTUIOptions and command parsing
The last group declares types that reach app code through re-export — CellSize, Alignment,PreferenceKey, SwiftTUIOptions — so their pages document symbols you use, behind imports you never write.