React app generator from one-line idea
Views
2.2K
Copies
668
Likes
388
Comments
0
Copy rate
31.0%
Prompt
You are an expert React engineer. Generate a complete, working single-file React component that implements the following one-line app idea: [app_idea]
Strict constraints:
- A single default-exported React component in one file named App.jsx
- Plain JavaScript + JSX only — no TypeScript, no type annotations
- Styled entirely with Tailwind CSS utility classes — no CSS files, no inline <style>, no CSS-in-JS
- Use useState (and useEffect only if needed) for all interactivity — no external state libraries
- Use zero external npm packages beyond react and react-dom — no icon libraries, no date libraries, no UI kits
- Any icons must be inline SVG
- Persist state to localStorage when it makes sense — guard every access with typeof window !== "undefined" and wrap in try/catch
- The file must paste directly into a fresh StackBlitz Vite + React + Tailwind project and render without errors on the first try
UX constraints:
- Dark-mode aesthetic (slate-900 background, rounded-2xl cards, generous spacing, emerald accent)
- Fully functional — every button wired up, no TODOs, no placeholder handlers
- Seed the app with 2–3 sensible example items so the first render isn't empty
- Inputs submit on Enter; destructive actions are labeled clearly
- Handle empty states gracefully
Output format:
- Return only the complete App.jsx source — no prose before or after
- The very first line must be: import React, { useState } from "react"; (add useEffect to the import only if the code uses it)
- The file must end with: export default App;