Jetpack Compose Preview for VS CodeRender Jetpack Compose Open a Kotlin file, press
Why this oneOther preview tools get speed by injecting their own Gradle plugin into your build and demanding the newest toolchain. This extension takes the opposite approach: it works with the project you already have.
If your team is on a pinned Gradle version, behind a corporate proxy, or simply doesn't want third-party plugins inside the build — this is the preview tool that still works. How it works
Under the hood:
Quick start1. Add Paparazzi to your module
2. Add a Paparazzi test class that reads
|
| Free | Pro | |
|---|---|---|
Manual preview (Cmd+Shift+V, refresh buttons) |
✅ | ✅ |
| Paparazzi + emulator/device rendering | ✅ | ✅ |
Stacked @Preview variants, @PreviewParameter, metadata |
✅ | ✅ |
| Auto-refresh on every save | 14-day trial | ✅ |
- One-time purchase — not a subscription. 12 months of updates included.
- 14-day full trial, no signup required.
- 30-day offline grace — validated licenses keep working without network.
- Enter your key via
Compose: Enter License Keyor thecomposePreview.licenseKeysetting.
The license check is deliberately lightweight — no telemetry, no account, no DRM rootkits. We trust you; the gate exists so honest users have an easy way to support the tool.
Editor integration
- CodeLens — a "▶ Preview" action above every
@Previewfunction. Click it to render just that composable. No Kotlin language server required — unlike other tools, this works out of the box in any VS Code fork. - Gutter icons — every
@Previewfunction is marked in the gutter. - Focused preview — render one function at a time; "Show all" brings the rest back.
- Previewer generator —
Compose: Generate Previewer Testscans your module and writes theComposePreviewer.kttest class for you (shown as a button on the setup screen too).
Commands
| Command | Default keybinding |
|---|---|
Compose: Show Preview |
Cmd+Shift+V / Ctrl+Shift+V |
Compose: Refresh Preview |
— |
Compose: Generate Previewer Test |
— |
Compose: Enter License Key |
— |
Settings
| Setting | Default | Description |
|---|---|---|
composePreview.gradleProjectPath |
"" |
Override auto-detected project root |
composePreview.renderer |
"auto" |
auto / paparazzi / emulator |
composePreview.autoRefreshOnSave |
true |
Refresh preview on every file save (Pro after trial) |
composePreview.codeLens |
true |
Show "▶ Preview" CodeLens above @Preview functions |
composePreview.licenseKey |
"" |
Your Pro license key |
Requirements
- VS Code 1.90+ (or Cursor)
- An Android project with
gradlewat the workspace root - For Paparazzi rendering: Gradle ≤ 8.7 (Gradle 9 support pending upstream Paparazzi support), AGP 8.5+
- For emulator rendering: adb + a connected device or emulator
Known limitations
- Preview parsing is regex-based — edge cases like multiline annotation args may not be detected
- First Paparazzi run compiles the full module (~30-60s); subsequent runs are incremental (~10s warm, ~2s no-op)
- The
COMPOSE_PREVIEW_FILTERintegration requires a test class in your project (see Quick start, step 2) - Gradle 9.x is not yet supported by Paparazzi 1.3.5 — use Gradle ≤ 8.7
- Editing a transitive dependency of a
@PreviewParameterprovider isn't auto-detected — use manual refresh
Roadmap
- [x] CodeLens & gutter icons — "▶ Preview" directly above each
@Previewfunction, no language server required - [x] One-command previewer generation — scan your module and generate the
ComposePreviewertest class for you - [ ] Persistent render daemon — keep layoutlib warm between saves and cut render time to ~3-4s (Pro)
- [ ] MCP server for AI agents (Cursor, Claude Code)
Contributing / source-available
The source is visible for transparency and auditing, but this is not open-source software — see the license below.
git clone https://github.com/firezenk/compose-preview-vscode
cd compose-preview-vscode
npm install
Press F5 in VS Code to launch the Extension Development Host. The sample/ Android project opens automatically so you can test the full flow immediately.
License
Proprietary — see LICENSE. In short:
- Personal license for you, the purchaser
- 12 months of updates from the date of purchase
- No redistribution or resale
- Source visibility does not grant usage or modification rights
Note: v0.0.1 was published with an incorrect MIT license file by mistake; the proprietary EULA applies from v0.0.2 onward.
