A powerful, modern form builder built with React 18 and TypeScript. Create professional forms with drag-and-drop functionality and export them as JSON schemas or React components.
🌐 Live Demo: https://form-craft.onrender.com
- Drag & Drop Interface - Intuitive field placement with @dnd-kit
- Live Preview - See your form in action as you build it
- Export Options - JSON Schema or React TypeScript components
- Form Templates - Pre-built forms (Contact, Registration, Survey, Order)
- Multi-Step Forms - Break long forms into manageable steps
- Conditional Fields - Show/hide fields based on other field values
- Advanced Validation - Custom regex patterns, min/max lengths, custom error messages
- Dark/Light Theme - Toggle between themes with system preference detection
- Text, Email, Password, Number, Tel, URL
- Textarea, Select, Radio buttons, Checkboxes
- Date, Time, DateTime, File upload
- Built with Tailwind CSS and shadcn/ui components
- Responsive design for all devices
- Professional, clean interface
- React 18 - Latest React with concurrent features
- TypeScript - Full type safety throughout
- Vite - Fast build tool and dev server
- Zustand - Lightweight state management
- @dnd-kit - Modern drag and drop library
- Tailwind CSS - Utility-first CSS framework
- shadcn/ui - High-quality React components
- React Hook Form - Performant forms with validation
- Zod - TypeScript-first schema validation
- Clone the repository
git clone https://github.com/yourusername/form-craft.git
cd form-craft- Install dependencies
npm install- Start development server
npm run dev- Open your browser
Navigate to
http://localhost:5173
- Add Fields - Drag field types from the left palette to the form canvas
- Configure Fields - Click any field to edit its properties in the right panel
- Reorder Fields - Drag fields within the canvas to reorder them
- Delete Fields - Click the trash icon to remove unwanted fields
- Choose from pre-built templates: Contact, Registration, Survey, Order
- Click any template to instantly load it
- Customize the loaded template as needed
- Enable Multi-Step - Toggle the switch in the Multi-Step panel
- Add Steps - Click the "+" button to create additional steps
- Navigate Steps - Click step boxes or use arrow buttons
- Build Each Step - Add fields to the current active step
- Select a Field - Click on any field to edit it
- Set Dependency - Choose which field this field depends on
- Set Condition - Choose equals, not equals, contains, or not empty
- Set Value - Enter the condition value
- Min/Max Length - Set character limits for text fields
- Regex Patterns - Custom validation patterns (e.g.,
^[A-Za-z]+$) - Custom Error Messages - Personalized validation messages
- JSON Schema - For backend integration and API processing
- React Component - Ready-to-use TypeScript React component with validation
src/
├── components/ # React components
│ ├── ui/ # Reusable UI components (shadcn/ui)
│ ├── FieldPalette.tsx # Draggable field types
│ ├── FormCanvas.tsx # Main form building area
│ ├── SortableField.tsx # Individual form fields
│ ├── FieldEditor.tsx # Field property editor
│ ├── FormPreview.tsx # Live form preview
│ ├── FormTemplates.tsx # Pre-built form templates
│ ├── MultiStepControls.tsx # Multi-step form controls
│ ├── ExportPanel.tsx # Export functionality
│ └── ThemeToggle.tsx # Dark/light theme toggle
├── store/ # Zustand store
│ └── formStore.ts # Main form state management
├── types/ # TypeScript type definitions
│ └── index.ts # Form and field type definitions
├── lib/ # Utility functions
│ └── utils.ts # Helper functions
├── utils/ # Additional utilities
│ └── keepAlive.ts # Keep-alive functionality
└── App.tsx # Main application component
- Toggle between light and dark themes
- System preference detection
- Persistent theme selection
- Modify Tailwind CSS classes
- Customize component styles in
src/components/ui/ - Update global styles in
src/globals.css
npm run build- Connect your GitHub repository to Render
- Set build command:
npm run build - Set publish directory:
dist - Deploy as a Static Site
- Comprehensive meta tags for search engines
- Open Graph tags for social media sharing
- Twitter Card support
- Structured data (JSON-LD)
- Sitemap and robots.txt
- Google Analytics integration
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- shadcn/ui - Beautiful component library
- @dnd-kit - Excellent drag and drop functionality
- Lucide - Icon set
- Tailwind CSS - CSS framework
- React Hook Form - Form handling
- Zod - Schema validation
If you have any questions or need help, please:
- Open an issue on GitHub
- Visit the live demo at form-craft.onrender.com
Built with ❤️ using React, TypeScript, and modern web technologies.