A static visual index for SwiftUI/UIKit previews, preview captures, and swift-snapshot-testing reference images.
UIAtlas turns existing visual artifacts into a searchable HTML gallery for design-system documentation, PR reviews, CI reporting, and stakeholder review. It is not a snapshot testing library or a live component workbench; it sits on top of the preview or snapshot workflow you already have.
Teams accumulate dozens or hundreds of visual states, but they live scattered across test folders, source files, and CI artifacts. UIAtlas gives those states one browsable home with search, filters, ownership metadata, coverage and PR-friendly diff output.
Use UIAtlas when your SwiftUI/UIKit app already has visual states captured as preview screenshots or snapshot-test reference images, and you want a static HTML report that engineers, QA, UX, product, and marketing can open without running Xcode, a simulator or a separate catalog app.
UIAtlas is snapshot-first: it reflects the UI artifacts your app already generates. It does not ask teams to maintain a parallel set of hand-authored component stories before they can browse, review or share the current app UI.
| Source | Status | Notes |
|---|---|---|
| SwiftUI preview captures | Supported | Import rendered #Preview screenshots from your own capture pipeline. |
swift-snapshot-testing __Snapshots__ |
Supported | Import existing reference PNGs directly from snapshot test folders. |
| Hand-authored manifests | Supported | Describe any image set with uiatlas.json when you need full control. |
| Jetpack Compose previews | Upcoming | Planned for teams that want the same static visual index for Android UI. |
UIAtlas writes a static, searchable report with coverage, filters and a component gallery.
Open any component to inspect every captured variant across devices, color schemes, dynamic type sizes and accessibility states.
- Searchable component gallery grouped by module
- Detail view for every device, color scheme, dynamic type and accessibility variant
- Direct import of swift-snapshot-testing
__Snapshots__folders - Source scanning for SwiftUI preview coverage
- App icon branding and derived accent colors
- Missing image diagnostics in the generated report
- Markdown/JSON diff summaries for PRs
- Static HTML output that works from disk or CI artifacts
UIAtlas is a Swift Package targeting macOS 14+.
git clone https://github.com/crleonard/UIAtlas.git
cd UIAtlas
swift build -c releaseThe executable is produced at .build/release/uiatlas. During
development, run commands with swift run uiatlas ....
From the root of your app repository, pick the source you already have.
Existing __Snapshots__ references from swift-snapshot-testing:
uiatlas report \
--snapshots ./MyAppTests/__Snapshots__ \
--source-root ./MyApp \
--project-name MyApp \
--output UIAtlas \
--forceRendered preview captures:
uiatlas report \
--source-root ./MyApp \
--screenshots ./PreviewScreenshots \
--project-name MyApp \
--output UIAtlas \
--forceOpen the report:
open UIAtlas/index.htmlShare the report:
uiatlas archive \
--report UIAtlas \
--output UIAtlas.zip \
--forceRunnable fixtures live under Examples/:
Examples/PreviewFixtureshows rendered SwiftUI preview capture import.Examples/SnapshotTestingFixtureshows direct__Snapshots__import.Examples/BasicManifestshows a hand-authored manifest.
Generate the preview capture PNGs with:
swiftc \
Examples/PreviewFixture/render_previews.swift \
Examples/PreviewFixture/MyApp/DashboardView.swift \
Examples/PreviewFixture/MyApp/SettingsView.swift \
-o /tmp/render-previews
/tmp/render-previews Examples/PreviewFixture/PreviewScreenshotsGenerate the snapshot reference PNGs with:
python3 Examples/make_fixture_images.py| Command | Purpose |
|---|---|
uiatlas report |
Primary one-step report command for preview captures or __Snapshots__. |
uiatlas archive |
Package a generated report as a zip artifact. |
uiatlas validate |
Validate manifest structure and referenced image files. |
uiatlas ci |
Generate a report and enforce CI gates. |
uiatlas import |
Lower-level manifest generation. |
uiatlas generate |
Lower-level static site generation from a manifest. |
uiatlas coverage |
Report SwiftUI preview coverage. |
uiatlas diff |
Compare two manifests and print preview changes. |
uiatlas scaffold-capture |
Generate a Swift Testing capture file from #Preview blocks. |
Issues and pull requests are welcome.
swift build
swift testPlease keep the project useful with existing manifests, preview captures and snapshot references before reaching for deeper Xcode automation.
See CONTRIBUTING.md and SECURITY.md.
MIT. See LICENSE.


