Skip to main content
Version: 1.0.3

Introduction

Easily design forms in minutes using the popular react-hook-form library alongside Material-UI. This package offers a suite of 20 reusable and customizable MUI components, reducing code duplication and providing the flexibility to style form fields according to your website's design.

You can also find some additional components in this package like color-picker and rich text editor that are not currently a part of Material-UI, but will come in handy when you need them. More components will be added in the future based on the feedback from the community. You are most welcome to raise a feature request or suggest bug fix by contacting the author of this package.

Installation

To get started, install react-hook-form and @nish1896/rhf-mui-components.

npm i react-hook-form @nish1896/rhf-mui-components
yarn add react-hook-form @nish1896/rhf-mui-components

Ensure that you also have installed Material UI. If not, refer to the installation guide. For datepickers, follow the installation guide to install @mui/x-date-pickers. The form components are compatible with both v5 and v6 of material-ui.

Optional : If you are using a third party library for form validation, say joi, make sure to install its npm package along with the @hookform/resolvers package.

npm i @hookform/resolvers joi
yarn add @hookform/resolvers joi