Accessible components, and a form builder made from them. A small UI kit (Button, TextField, Modal, Tabs, Toast) written from scratch with no UI library, plus a form builder that uses those same components.
Live demo: https://form-forge-three.vercel.app
Form builder
- Add text, email, number and dropdown fields
- Edit each field's label, options, min/max and whether it's required
- Reorder fields (↑ / ↓) or delete them
- Live preview: a real, working form with validation (required, email format, number range)
- On a failed submit, focus jumps to the first invalid field and a toast says how many to fix
- Export the form as JSON; your form is saved in the browser and survives a refresh
UI kit (Components tab)
| Component | Accessibility details |
|---|---|
| Button | Defaults to type="button" so it never submits a form by accident |
| TextField | <label for>, aria-invalid, aria-describedby linking the hint or error |
| Modal | role="dialog", focus trap, Esc and backdrop close, focus returned to the opener, rendered in a portal |
| Tabs | WAI-ARIA tabs pattern: roving tabindex, ← / → / Home / End |
| Toast | aria-live region, auto-dismiss after 4 s, timers cleaned up |
React 19 · CSS Modules · Vite · Vitest + React Testing Library · no UI library
npm install
npm run dev # http://localhost:5173
npm test # 8 tests: validation, reducer, Modal keyboard, Tabs keyboard
npm run buildsrc/
components/ Button, TextField, Modal, Tabs, Toast (+ .module.css each)
hooks/ useFocusTrap, useStoredReducer (useReducer + localStorage)
builder/ Builder, FieldEditor, FormPreview, fields, validate, fieldsReducer
gallery/ Gallery (the Components tab)
tests/ validate, fieldsReducer, Modal (keyboard), Tabs (keyboard)
Import the repo on vercel.com → framework preset Vite → Deploy. No config needed: it's a single page with no routes.
Built by Suprakash Ballav.

