About this project
This project simplifies the use of react-form-hook
and Material-UI
. It provides opinionated use cases with following
components:
- FormContainer
- TextFieldElement
- SelectElement
- MultiSelectElement
- RadioButtonGroup
- CheckboxButtonGroup
- CheckboxElement
- PasswordElement
- DatePickerElement
The components are written in TypeScript and attempt an easy integration.
How to use it
import {FormContainer, TextFieldElement} from 'react-form-hook-mui'
function Form(){
return (
<FormContainer
defaultValues={{name: ''}}
onSuccess={(data) => {console.log(data)}}
>
<TextFieldElement name="name" label="Name" required/>
</FormContainer>
)
}
You can have a look at the example
folder which sets up NextJS with react-form-hook-mui
Demo
Check out Storybook: Demo
You will find examples and use cases.
Bundle
This project uses microbundle
and multiple entries for bundling.
License
Changelog
- 2.x Most recent react-form-hook