Piplup
Rhf adaptersMui file input

Installation — @piplup/rhf-adapters (mui-file-input)

React Hook Form adapters for mui-file-input components.

@piplup/rhf-adapters/mui-file-input connects mui-file-input fields to React Hook Form.

First, install the core packages, if not installed already:

npm install @piplup/rhf-core react-hook-form

Then, install the adapters package together with the MUI Material and mui-file-input peer dependencies:

npm install @piplup/rhf-adapters @mui/material @emotion/react @emotion/styled @mui/x-date-pickers mui-file-input

Import

import { MuiFileInputElement, useMuiFileInputAdapter } from "@piplup/rhf-adapters/mui-file-input";

Use /mui-file-input subpath when you need mui-file-input components to stay in sync with react-hook-form.

See also

On this page