ilokesto

Adapter useForm

All adapters can start from an existing core form or create one from options. React, Vue, and Solid return form, useRegister, useField, useFormState, and handleSubmit; React also exposes useFieldState. Their binding props differ by framework event names, but the field options are shared through RegisterOptions: name, optional schema, schemaOptions, type, value, checkedValue, and uncheckedValue.

const react = useReactForm(form);
const vue = useVueForm(form);
const solid = useSolidForm(form);
const svelte = useSvelteForm(form);

Svelte is intentionally action-centered. It returns form, a register action, useField, useFormState() as a readable store, and handleSubmit. It does not expose useRegister, so simple Svelte bindings should use the action. For text inputs, checkbox, radio, select, and multiple select behavior, read the integration page for your framework.

Practical guidance

Keep this page near the source when you build abstractions. The reference describes what the package exposes, while guides show one way to compose those pieces. If a helper hides FieldPathInput, validation triggers, or array rebasing, document that helper with the same precision so future maintainers know whether strings, tuples, or stable keys are expected.

On this page