src/main.tsx
import { StrictMode } from 'react'
import { createRoot } from 'react-dom/client'
import App from './App'
import './styles.css'
createRoot(document.getElementById('root')!).render(
<StrictMode>
<App />
</StrictMode>,
)
Online React and Tailwind CSS playground with TypeScript, editable component files, Tailwind CSS v4 utilities, and instant live preview.
Choose a source file from the explorer and edit it with Monaco.
Edit package.json to add browser-compatible npm packages or change versions. Preview packages load from esm.sh. Successful previews save resolved versions for ranges and tags with your draft and shares; change the range to resolve again. Scripts and build plugins run only in downloaded projects.
Auto-run updates the browser preview as you type. Turn it off to run your changes manually.
Use the console for browser logs and errors, or evaluate a command against the preview.
Share creates a snapshot link. Download exports the source so you can continue locally.
import { StrictMode } from 'react'
import { createRoot } from 'react-dom/client'
import App from './App'
import './styles.css'
createRoot(document.getElementById('root')!).render(
<StrictMode>
<App />
</StrictMode>,
)
import { useState } from 'react'
import { MetricCard } from './components/MetricCard'
export default function App() {
const [deployed, setDeployed] = useState(false)
return (
<main className="min-h-screen bg-slate-950 px-6 py-16 text-slate-100">
<section className="mx-auto max-w-4xl">
<span className="rounded-full border border-cyan-400/25 bg-cyan-400/10 px-3 py-1 font-mono text-xs font-bold uppercase tracking-[0.18em] text-cyan-300">
React 19 + Tailwind CSS 4
</span>
<div className="mt-8 grid gap-8 lg:grid-cols-[1.25fr_0.75fr] lg:items-end">
<div>
<h1 className="text-5xl font-black tracking-[-0.055em] text-white sm:text-7xl">
Style components directly in TSX.
</h1>
<p className="mt-5 max-w-2xl text-lg leading-8 text-slate-400">
Edit utility classes, component files, and design tokens with an
instant React preview.
</p>
</div>
<button
type="button"
onClick={() => setDeployed((value) => !value)}
className="rounded-2xl bg-cyan-400 px-5 py-3 font-bold text-slate-950 shadow-lg shadow-cyan-500/20 transition hover:-translate-y-0.5 hover:bg-cyan-300"
>
{deployed ? 'Deployed successfully' : 'Deploy preview'}
</button>
</div>
<div className="mt-12 grid gap-4 sm:grid-cols-3">
<MetricCard label="Components" value="2" detail="Editable files" />
<MetricCard label="Runtime" value="19.2" detail="React + TypeScript" />
<MetricCard label="Styling" value="v4" detail="Tailwind CSS" />
</div>
</section>
</main>
)
}
The editor uses Monaco, the engine behind VS Code, with language-aware editing tools and familiar keyboard controls.
Edit a source file from the project explorer — the live preview recompiles automatically.
Add, rename, duplicate or delete project files as needed. Update affected imports after renaming or moving a file.
Use the console for logs and errors, and Format to tidy the active file.
Share the complete project or download a Vite project ZIP with its source files and package.json.
React 19 + TypeScript
Tailwind CSS v4
Utility Class IntelliSense
Editable Project Files
Local Component Imports
Live Preview
Vite Project Export
Auto-run updates the preview as you type. Turn it off to run manually with Run or Ctrl/⌘ + Enter.
The Console prompt can inspect browser globals and the rendered DOM, but not variables scoped inside ES modules or component state.
Console shortcuts apply when its prompt is focused. Editor shortcuts apply inside the code editor.
Code runs in a sandboxed browser preview, without Node.js, a backend, or private environment variables.
Download the project when you need build plugins, server APIs, native modules, or a production dependency workflow.