A modern, user-friendly multi-step form built with Next.js and TypeScript. Features dark mode, internationalization, and real-time validation.
- Multi-step form navigation
- Real-time validation
- Dark mode support
- Internationalization (i18n)
- Responsive design
- Form state persistence
- Next.js - React framework
- TypeScript - Type safety
- Tailwind CSS - Styling
- Zustand - State management
- ShadcN UI - UI components
- next-i18next - Internationalization
├── app/ # Next.js app directory
├── components/
│ ├── form/ # Form-related components
│ │ └── steps/ # Individual form steps
│ └── ui/ # Reusable UI components
├── lib/ # Utilities and helpers
├── public/
│ └── locales/ # Translation files
└── types/ # TypeScript types
- Personal Info - Basic user information
- Address Details - Location information
- Preferences - User preferences
- Review - Final review and submission
- Uses Zustand for simple, persistent state
- Form data persists across page reloads
- Real-time validation and error handling
- Supports multiple languages
- Easy to add new translations
- Automatic language detection
-
Install dependencies:
npm install
-
Run development server:
npm run dev
-
Build for production:
npm run build
- Real-time field validation
- Custom validation rules:
- Email format
- Phone number format
- 6-digit ZIP code
- Required fields
- Responsive design using Tailwind CSS
- Dark mode support
- Consistent UI components from ShadcN
- Custom theme configuration
- Create a new file in
public/locales/[lang]/common.json - Add translations following the English template
- Update
next-i18next.config.jswith the new locale
- Component-based architecture
- Single responsibility principle
- Type safety with TypeScript
- Consistent error handling
- Responsive design patterns