Convert any UI screenshot into production-ready React components
Project description
Take a screenshot of any UI. Get a complete, runnable React project in seconds.
uiforge dashboard.png
Not this:
<div style="position:absolute;left:143px;top:492px;width:241px">
<div>
<div>
This:
<DashboardLayout>
<Sidebar />
<Topbar />
<StatsGrid>
<RevenueCard title="Total Revenue" value="$48,295" trend="+12%" />
<OrdersCard title="Orders" value="1,429" trend="+8%" />
<VisitorsCard title="Visitors" value="24.5k" trend="+3%" />
</StatsGrid>
<SalesChart />
<RecentOrders />
</DashboardLayout>
Semantic, named, composable — ready to npm run dev.
Install
pip install uiforge-cli
Or try without installing:
uvx uiforge-cli dashboard.png
UIForge uses Claude's vision API. Set your key:
export ANTHROPIC_API_KEY=sk-ant-...
Get a free key at console.anthropic.com
Usage
uiforge dashboard.png # React + Vite (default)
uiforge dashboard.png --framework next # Next.js
uiforge dashboard.png --output ./my-app # custom output dir
uiforge dashboard.png --context "dark SaaS" # hint for better results
uiforge dashboard.png --dry-run # analyze only, no codegen
What you get
my-app/
├── src/
│ ├── Dashboard.tsx ← main page, composes everything
│ ├── components/
│ │ ├── Sidebar.tsx ← each component is its own file
│ │ ├── Topbar.tsx
│ │ ├── StatsGrid.tsx
│ │ ├── RevenueCard.tsx
│ │ ├── SalesChart.tsx ← recharts, wired up
│ │ └── RecentOrders.tsx ← real table with mock data
│ ├── lib/utils.ts ← cn() helper
│ └── globals.css ← colors extracted from your screenshot
├── package.json
├── tailwind.config.js ← exact colors from the image
└── tsconfig.json
cd my-app && npm install && npm run dev
It runs.
How it works
UIForge runs a 3-step pipeline:
1 — Analyze
Claude Vision reads the screenshot and returns a structured component tree: names, types, hierarchy, Shadcn/UI matches, Lucide icon suggestions, and exact hex colors from the image.
2 — Generate
Each component is generated independently. UIForge instructs the model to use Tailwind classes only (no position: absolute), wire in Shadcn/UI primitives where detected, add Framer Motion hover animations, and include realistic placeholder data.
3 — Scaffold
A complete project is written to disk — package.json, tailwind.config.js with the extracted color palette, tsconfig.json, globals.css, and all component files.
Generated stack
| Framework | React 18 + TypeScript |
| Styling | Tailwind CSS (colors from your screenshot) |
| Components | Shadcn/UI |
| Icons | Lucide React |
| Animation | Framer Motion |
| Charts | Recharts |
| Build | Vite or Next.js |
Why not the other tools?
| Most tools | UIForge | |
|---|---|---|
| Output | <div style="left:143px"> |
Tailwind classes |
| Structure | One 1500-line file | One file per component |
| Runs immediately | No | npm install && npm run dev |
| Component names | Component1, Box3 |
Sidebar, StatsCard |
| Design tokens | Ignored | Colors wired into tailwind.config.js |
| Charts | Static image | Working Recharts component |
| Shadcn/UI | Never | Auto-detected and used |
Roadmap
-
--dark— generate light + dark theme variants -
--responsive— one screenshot → desktop + tablet + mobile -
--vue/--svelte/--flutteroutput targets - URL input:
uiforge https://dribbble.com/shots/... - Render validation — screenshot the output, compare to original, auto-fix
- Storybook story generation
- Figma token export
Contributing
Good first issues:
- Vue 3 + Composition API output target
- Better chart detection (pie, area, scatter)
--responsiveflag implementation- Render validation loop
- Test fixtures (screenshots + expected component trees)
See CONTRIBUTING.md for setup.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file uiforge_cli-0.1.0.tar.gz.
File metadata
- Download URL: uiforge_cli-0.1.0.tar.gz
- Upload date:
- Size: 15.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0b486ba27582c7f133ebf4bfff03864599a3ef5bebdb5022c91cfd57d56bac98
|
|
| MD5 |
b7011a82a3f8263651973fa04114c232
|
|
| BLAKE2b-256 |
c84c955e01b4772e7fbbc50ca3dace2b8f1f08a26372e70ba95dedc6bcf193cd
|
File details
Details for the file uiforge_cli-0.1.0-py3-none-any.whl.
File metadata
- Download URL: uiforge_cli-0.1.0-py3-none-any.whl
- Upload date:
- Size: 16.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5bc7d3a1b34effd5e5be734f26f212fccbe145858341ccae4ec76543bfcec674
|
|
| MD5 |
ea1494d38c65050e63130fee856c33ad
|
|
| BLAKE2b-256 |
81966a8bd17212c26f4137d593ad4673aa090307d74f70f68010d946e6ba6e2e
|