JSXPlayground is a comprehensive web-based React development environment that allows developers to write, preview, and experiment with React code in real-time, all within the browser. No setup required!
- Built around CodeSandbox's Sandpack for real-time code editing and previewing
- Syntax highlighting, auto-completion, and error detection
- File explorer for easy navigation between files
- Real-time preview of rendered components
- Create new files with appropriate templates based on file type
- Delete files when no longer needed
- File system simulation with project structure
- Integration with Google's Gemini 1.5 Pro API
- Generate complete React components from text descriptions
- Apply AI suggestions directly into the editor
- Simulated terminal interface for npm commands
- Install npm packages directly from the terminal
- Automatically updates package.json with new dependencies
- Toggle between light and dark themes
- Tailwind CSS styling for consistent UI
- Frontend Framework: React 19 with modern Hooks
- Build System: Vite 6 for fast development and optimized production builds
- Styling: Tailwind CSS for responsive design
- Code Editor: @codesandbox/sandpack-react for in-browser code execution
- AI Integration: @google/generative-ai SDK
- Terminal Emulation: Custom implementation with npm command support
- Node.js 18+ and npm
# Clone the repository
git clone https://github.com/yourusername/jsx-playground.git
# Navigate to project directory
cd jsx-playground
# Install dependencies
npm install
# Start the development server
npm run dev- Click the "New" button in the file explorer
- Enter a filename with appropriate extension
- Select the file type template
- Begin editing your new file
- Click on the terminal tab
- Use the command:
npm install package-name - The package will be automatically added to your dependencies
- Click the "AI" button in the editor
- Enter a description of the component you want to create
- Review the generated code and apply it to your project
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the project
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
