A customizable form framework for react
Fomir
A Schema-First Form Library
Installation
npm install fomir fomir-react
Usage
function BasicForm() {
const form = useForm({
onSubmit(values) {
alert(JSON.stringify(values, null, 2))
console.log('values', values)
},
children: [
{
label: 'First Name',
name: 'firstName',
component: 'Input',
value: '',
},
{
label: 'Last Name',
name: 'lastName',
component: 'Input',
value: '',
},
{
component: 'Submit',
text: 'submit',
},
],
})
return <Form form={form} />
}
Documentation
Documentation website: fomir.vercel.app
Development
- Contributing Guide
License
MIT License