chainwindcss Tailwind Templates

Chainwindcss

Draw your design and get Tailwind CSS code instantly using AI. This example has been created using the tldraw SDK, offering features similar to computer.tldraw.com.

ChainwindCSS

ChainwindCSS is a visual tool that helps you generate Tailwind CSS code through a node-based interface. Connect nodes, draw frames, and instantly get the corresponding Tailwind CSS code.

This example has been created using the tldraw SDK, offering features similar to computer.tldraw.com.

🌟 Features

  • Node-based visual interface
  • Real-time Tailwind CSS code generation
  • Support for text, frames, and image inputs
  • Interactive design workflow

šŸ›  Prerequisites

Before you begin, ensure you have:

  • Node.js installed
  • An OpenAI API key
    • Create .env file in the root directory
    • Add your OpenAI API key: OPENAI_API_KEY=your_api_key_here

šŸš€ Getting Started

  1. Clone the repository
  2. Install dependencies:
    npm install
    
  3. Set up your environment variables (see Prerequisites)
  4. Run the development server:
    npm run dev
    

šŸ“ How to Use

  1. Connect text nodes to the Tailwind generate node using arrows
  2. Draw your desired layout using Frames and connect them to the Tailwind generate node
  3. Connect images to the Tailwind generate node for image-based generation
usage

šŸ“ Project Structure

chainwindcss/
ā”œā”€ā”€ src/
│   ā”œā”€ā”€ app/
│   │   ā”œā”€ā”€ api/
│   │   │   └── generate/
│   │   │       └── tailwind/
│   │   ā”œā”€ā”€ layout.tsx
│   │   └── page.tsx
│   ā”œā”€ā”€ components/
│   │   ā”œā”€ā”€ draw/
│   │   │   ā”œā”€ā”€ code-preview.tsx
│   │   │   ā”œā”€ā”€ drawing-canvas.tsx
│   │   │   ā”œā”€ā”€ error-boundary.tsx
│   │   │   └── generate-box.tsx
│   │   ā”œā”€ā”€ svg/
│   │   ā”œā”€ā”€ tiptap/
│   │   │   └── Tiptap.tsx
│   │   └── tldraw/
│   │       ā”œā”€ā”€ tailwindShape.tsx
│   │       └── textInputShape.tsx
│   └── tldraw-utils/
│       └── custom.ts
ā”œā”€ā”€ public/
│   ā”œā”€ā”€ globe.svg
│   └── file.svg
ā”œā”€ā”€ .env
ā”œā”€ā”€ next.config.js
ā”œā”€ā”€ package.json
ā”œā”€ā”€ postcss.config.mjs
└── tsconfig.json

🌐 Live Demo

Visit chainwindcss.com to try it out!

šŸ“§ Contact

For questions or feedback, reach out to:

šŸ¤ Contributing

Contributions are welcome! Feel free to submit issues and pull requests.

Top categories

Loading Svelte Themes