{"repo":"dohomi/react-hook-form-mui","free":true,"listed":false,"github":"https://github.com/dohomi/react-hook-form-mui","clone":"git clone https://github.com/dohomi/react-hook-form-mui.git","description":"Material-UI form components ready to use with react-hook-form","language":"JavaScript","stars":644,"topics":["material-ui","react-hook-form","react","typescript"],"license":"MIT","category":"ui-components","readme_excerpt":"Material-UI and react-hook-form combined About this project This project simplifies the use of react-hook-form and Material-UI . It provides opinionated use cases with following components: FormContainer AutocompleteElement TextFieldElement SelectElement MultiSelectElement RadioButtonGroup CheckboxButtonGroup CheckboxElement SwitchElement PasswordElement DatePickerElement DateTimePickerElement SliderElement ToggleButtonGroupElement Please check out the demo for the element overview. How to use it Installation This package utilizes pickers and icons of the MUI ecosystem. If you make use of it add them to your app. Important From versions = 3.x of this package MUI v5 is in use. Versions of 1 & 2 using Material-UI v4 From version = 6 x-date-pickers version 6 is in use. Make sure you upgrade your dependencies. Simple form setup Typesafe form setup You can have a look at all different possibilities to use forms at following code examples FormContainer creates formContext The wires up a form and you can create sub-components which either make use of useFormContext() useWatch() to react to form values. Demo Check out Storybook: Demo You will find examples and use cases. With Datepicker If you are using the DatepickerElement keep in mind that you have to wrap your form with a provider: Examples for Dayjs or DateFns provider (used in the demo): DateFns Dayjs Troubleshooting Issues if context is undefined (useWatch) For convenient reasons this package is re-exporting react-hook-form wh","default_branch":null,"files":null,"tree":[],"storefront":"/r/dohomi","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/dohomi/react-hook-form-mui/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}