A web-based TailwindCSS visual builder for creating and sharing components with the community.
- 🎨 Visual Component Builder: Create and edit components with a clean, modern interface
- 📦 Component Library: Browse and manage blocks and templates
- 🔍 Live Preview: Preview components in a new window with TailwindCSS
- 📋 Copy to Clipboard: Easy copying of component HTML code
- 🏷️ Category System: Organize components with categories
- 🚀 Build System: Generate distribution files for CDN deployment
- 📱 Responsive Design: Built with modern UI components from shadcn/ui
- Bun runtime
- Node.js 18+ (for compatibility)
- Clone the repository:
git clone https://github.com/windbase/components.git
cd components
- Install dependencies:
bun install
- Start the development server:
bun run dev
- Open your browser and navigate to
http://localhost:3000
-
Click the "New Component" button
-
Fill in the component details:
- Name: Display name for your component
- Type: Choose between "Blocks" or "Templates"
- Author: Your name or organization
- Categories: Comma-separated categories (e.g., "header, hero, call-to-action")
- HTML Code: Your TailwindCSS component code
-
Click "Create" to save your component
- Find your component in the component grid
- Hover over the component card to reveal action buttons
- Click the edit icon (pencil) to modify the component
- Make your changes and click "Update"
- Preview: Click the eye icon to preview the component in a new window
- Copy Code: Click the copy icon to copy the HTML code to your clipboard
- Delete: Click the trash icon to remove a component
Generate distribution files for deployment:
bun run build:components
This creates a dist/
folder with:
blocks.json
- Metadata for all block componentstemplates.json
- Metadata for all template componentsblocks/
- HTML files for each block componenttemplates/
- HTML files for each template component
components/
├── contents/ # Source components
│ ├── blocks/ # Block components
│ │ └── component-name/
│ │ ├── index.html # Component HTML
│ │ └── metadata.json # Component metadata
│ └── templates/ # Template components
├── dist/ # Generated distribution files
│ ├── blocks.json # Block metadata
│ ├── templates.json # Template metadata
│ ├── blocks/ # Block HTML files
│ └── templates/ # Template HTML files
└── src/ # Application source code
├── components/ # React components
├── hooks/ # Custom hooks
├── types/ # TypeScript types
└── utils/ # Utility functions
Each component includes metadata in metadata.json
:
{
"id": "component-id",
"name": "Component Name",
"categories": ["category1", "category2", "category3"],
"author": "Author Name"
}
bun run dev
- Start development serverbun run build
- Build the applicationbun run build:components
- Generate component distribution filesbun run start
- Start production server
- Fork the repository
- Create a feature branch
- Add your components or improvements
- Submit a pull request
The dist/
folder is designed to be deployed to GitHub Pages or any CDN. After building, you can access components via:
https://your-domain.com/blocks/component-id.html
https://your-domain.com/templates/component-id.html
https://your-domain.com/blocks.json
https://your-domain.com/templates.json
- Runtime: Bun
- Framework: React 19
- Styling: TailwindCSS 4
- UI Components: shadcn/ui
- Forms: React Hook Form + Zod
- Build System: Custom build script
MIT License - feel free to use this project for your own component libraries!