Generate stunning React components at the snap of a finger
SnapAI is an AI-powered React component generator that transforms natural language descriptions into fully-functional React components with Tailwind CSS. Simply describe what you want, and watch as SnapAI creates the code for you along with a live preview.
Clone the repository:
git clone https://github.com/yourusername/snapai.git
cd snapai
Install dependencies:
npm install
# or
yarn install
Create a .env
file in the root directory:
VITE_SNAP_API_KEY=your_openai_api_key
Start the development server:
npm run dev
# or
yarn dev
Open your browser and navigate to http://localhost:5173
Type a description of the React component you want in the text area
Click the "Create" button to generate your component
Use the tabs to switch between code view and live preview
Copy the code to your clipboard with the copy button
snapai/
├── api/
│ └── generate.js
├── src/
│ ├── components/
│ │ ├── magicui/
│ │ │ ├── line-shadow-text.tsx
│ │ │ └── particles.tsx
│ ├── pages
│ │ └── Home.tsx
│ └── ...
├── public/
└── ...
Contributions are welcome! Please feel free to submit a Pull Request.
git checkout -b feature/your-feature
)git commit -m 'Add some sick feature'
)git push origin feature/your-feature
)