Material UI

The registration form demo written with Material UI, self-contained:

  • form.tsx: setupForm (with a renderRoot for the title and grid) and the config. props use Material UI's own API, typed by its components.

  • fields.tsx: the adapters, typed with Material UI's own props minus what useField() controls.

  • main.tsx: mounts it in the demo stage (header, payload drawer).

  • One small hook (useTextFieldProps) maps useField() to TextField props; text, long text and select reuse it (select + MenuItem).

  • Pass the field ref as inputRef so setFocus / focus on error work.

Tip

main.tsx only mounts the docs' demo stage (language switch, payload drawer); your app renders Form itself. See Connect your UI kit.

Live demo
form.tsx
fields.tsx
main.tsx