AI Tailwind Playground
An advanced AI-powered online playground for Tailwind CSS, built for Bardui.com. This interactive development environment allows you to generate and preview Tailwind CSS components in real-time using AI.
Features
- undefinedAI-Powered Component Generation: Ask the AI to create Tailwind CSS components using natural language
- undefinedLive Preview: See your components render instantly in a side-by-side preview pane
- undefinedMonaco Editor: Professional code editing experience with syntax highlighting
- undefinedReal-time Updates: Changes in the editor are immediately reflected in the preview
- undefinedTailwind CSS v4: Powered by the latest Tailwind CSS browser runtime
How It Works
- Type your request in the search input (e.g., โcreate a tailwind card componentโ)
- The AI generates HTML code with Tailwind CSS classes
- The code appears in the Monaco editor on the left
- The live preview on the right shows the rendered component instantly
- Edit the code manually or ask for more changes
Tech Stack
- undefinedNext.js 15 - React framework
- undefinedMonaco Editor - VS Codeโs editor component
- undefinedAI SDK - Vercel AI SDK for streaming responses
- undefinedDeepSeek - AI model integration
- undefinedTailwind CSS v4 - Utility-first CSS framework
Getting Started
-
Clone the repository
-
Install dependencies:
npm install
-
Set up your environment variables:
Create a .env.local file and add your DeepSeek API key:
DEEPSEEK_API_KEY=your_api_key_here
-
Run the development server:
npm run dev
-
Open http://localhost:3000 in your browser
Project Structure
โโโ src/
โ โโโ app/
โ โ โโโ api/chat/ # API route for AI chat
โ โ โโโ chat/ # Chat page component
โ โ โโโ page.tsx # Main playground page
โ โโโ components/
โ โโโ search-input.tsx # AI input component
Usage Tips
- Be specific in your requests (e.g., โcreate a responsive navigation bar with dark modeโ)
- The AI returns pure HTML with Tailwind classes - no frameworks or extra code
- You can manually edit the generated code in the editor
- The preview updates automatically as you type
License
Private project for Bardui.com