# @settlin/react-hook-form-mui

> A set of material style fields for react-hook-form

Latest version **1.1.3** (published 2025-02-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install @settlin/react-hook-form-mui
pnpm add @settlin/react-hook-form-mui
yarn add @settlin/react-hook-form-mui
bun add @settlin/react-hook-form-mui
```

## Health

**Score 30/100 (F)** — status: maintenance-mode.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.3 |
| Published | 2025-02-06 |
| First published | 2021-05-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 442.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | Settlin |
| Maintainers | s7dhansh, amit.settlin |
| Keywords | react-hook-form, material, form, field |

## Links

- npm: https://www.npmjs.com/package/@settlin/react-hook-form-mui
- Repository: https://github.com/settlin/node-monorepo
- Homepage: https://github.com/settlin/node-monorepo#readme
- Issues: https://github.com/settlin/node-monorepo/issues
- npm.io page: https://npm.io/package/@settlin/react-hook-form-mui

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.1.3 (latest) — 2025-02-06
- 1.1.2 — 2024-05-19
- 1.1.1 — 2023-08-18
- 1.1.0 — 2023-08-18
- 1.0.8 — 2023-07-12
- 1.0.7 — 2023-07-10
- 1.0.6 — 2023-02-10
- 1.0.5 — 2022-11-02
- 1.0.4 — 2022-10-14
- 1.0.3 — 2022-09-26
- 1.0.2 — 2022-08-01
- 1.0.1 — 2022-07-07
- 1.0.0 — 2022-05-05
- 0.2.6 — 2021-10-13
- 0.2.5 — 2021-08-31
- … 9 more at https://npm.io/package/@settlin/react-hook-form-mui/versions

## README

# @settlin/react-hook-form-mui

**v1.x.x - MUI v5**  
**v0.x.x - MUI v4**

A set of material style fields for [formik](https://github.com/jaredpalmer/formik) using [material-ui](https://github.com/mui-org/material-ui)

This library provides the following components:

- `Input` - a generic input field with all types eg: text, radio, checkbox, buttons (button group), switch, select, hidden, date.... Some extra fields like filter are also available.
- Formik-ed Components from MUI eg `Select` `TextField` `RadioGroup` etc...

## Documentation

- TODO
- Please see the code for now
- All components in formik directory are the actual formik `Field`s which are used by the generic `Input`
- All components in forms directory are wrappers over mui fields, which convert the formik and other props to relevant props using a hook called `useRMController`

## Installation

Using `npm`:

```bash
npm install --save @settlin/react-hook-form-mui
```

## Usage

```js
import React, { Component } from 'react';
import {useForm} from 'react-hook-form';
import {Input} from '@settlin/react-hook-form-mui';

const defaultValues = {username: 'name'};
const {handleSubmit} = useForm({defaultValues, mode: 'onChange'});


class MyForm extends Component {
  render() {
    return (
      <form onSubmit={handleSubmit(onSubmit)} style={{width: '100%'}}>
        <Input
          name="username"
          label="Username"
          margin="normal"
          fullWidth
        />
      </form>
    );
  }
}

```

## Exposed Fields

```js
export {default as Input} from './Input';

export {default as ButtonGroup} from './react-hook-form/ButtonGroup';
export {default as Checkbox} from './react-hook-form/Checkbox';
export {default as CheckboxGroup} from './react-hook-form/CheckboxGroup';
export {default as CurrencyField} from './react-hook-form/CurrencyField';
export {default as InputArra} from './react-hook-form/InputArray';
export {default as Persist} from './react-hook-form/Persist';
export {default as Radio} from './react-hook-form/Radio';
export {default as Select} from './react-hook-form/Select';
export {default as Switch} from './react-hook-form/Switch';
export {default as TextField} from './react-hook-form/TextField';
export {useRMController} from './react-hook-form/useRMController';

export {default as Button} from './forms/Button';

export {default as currencify} from './utils/currencify';
export {default as validateDob} from './utils/validate/dob';
export {default as validateEmail} from './utils/validate/email';
export {default as validateMobile} from './utils/validate/mobile';
```

## License

**@settlin/react-hook-form-mui** is released under the MIT License.

---
_Source: https://npm.io/package/@settlin/react-hook-form-mui · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
