Urgent.News

What's breaking now, across thousands of outlets.

Culture

Phonebook: a Storybook-style preview gallery for SwiftUI and Compose, built for agents

TL;DR I built Phonebook , an open-source CLI and MCP server that turns existing Jetpack Compose @Preview s and SwiftUI #Preview s into a static, self-hosted HTML gallery. Think Storybook-style component catalog, but for native mobile previews you already have in your codebase. No SaaS account. No extra Storybook files to maintain. No asking designers to install Xcode, Android Studio, or your…

The article discusses the creation of Phonebook, an open-source CLI and MCP server that transforms existing Jetpack Compose @Preview and SwiftUI #Preview components into a static HTML gallery. This gallery functions as a Storybook-style component catalog for native mobile previews, eliminating the need for developers to install Xcode, Android Studio, or debug apps to review loading states.

Mobile developers typically have efficient tools for rendering UI in isolation. For instance, Android developers can use @Preview in Jetpack Compose, while iOS developers have #Preview. However, when designers or other stakeholders request to see various states of buttons, loading screens, or dark mode versions, the preview becomes insufficient as it is confined within the developer's workflow.

The article explains that Storybook, a popular tool for web teams, does not have a direct equivalent for native mobile platforms. Teams have resorted to building their own solutions or catalog apps to address this issue. Phonebook aims to provide a solution by harvesting existing previews from the repository and converting them into a static website, avoiding the need to maintain separate sample apps or external services for hosting screenshots.

The tool generates a static HTML, CSS, JavaScript, and image files site that can be opened locally or uploaded to various hosting platforms.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Culture

More from Tuesday 25 August →