All Projects → dohomi → react-hook-form-mui

dohomi / react-hook-form-mui

Licence: MIT license
Material-UI form components ready to use with react-hook-form

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to react-hook-form-mui

react-firebase-template
Bootstrap a React + Firebase full stack application with every thing you need pre-configured: hosting, database, authentication, CI, Typescript, Material UI, PWA and other goodies.
Stars: ✭ 24 (-78.76%)
Mutual labels:  material-ui
emusak-ui
This is a tool which allows you to download saves or mods for Nintendo Switch emulators using a compatible Emusak backend
Stars: ✭ 877 (+676.11%)
Mutual labels:  material-ui
spring-javafx-material-design-admin
Aplicação desktop para Gerenciamento de estoque e vendas com Spring Boot, JavaFX e Material Design
Stars: ✭ 56 (-50.44%)
Mutual labels:  material-ui
logi-filter-builder
advanced SQL filter builder. Demo:
Stars: ✭ 23 (-79.65%)
Mutual labels:  material-ui
Google-Clone
A Google Clone which built with ReactJS. When you click Gmail button, you will be directed to my other project, Gmail Clone. You can search whatever you want and send realtime emails by clicking Gmail button!
Stars: ✭ 37 (-67.26%)
Mutual labels:  material-ui
Floral
Minimal design gallery app for Android.
Stars: ✭ 23 (-79.65%)
Mutual labels:  material-ui
amplify-material-ui
A Material-UI based implementation of aws amplify
Stars: ✭ 32 (-71.68%)
Mutual labels:  material-ui
juno
RingCentral React Component library, make your app have the same user experience as RingCentral Apps.
Stars: ✭ 26 (-76.99%)
Mutual labels:  material-ui
swing-material
A collection of Material Design components and utilities for Swing.
Stars: ✭ 52 (-53.98%)
Mutual labels:  material-ui
material-ui-swing
♥️ A modern Material Design UI for Java Swing ♥️
Stars: ✭ 255 (+125.66%)
Mutual labels:  material-ui
next-app-starter
Another awesome starter for your app base on nextjs + tailwind + react-query + react-hook-form + next-auth + jotai
Stars: ✭ 73 (-35.4%)
Mutual labels:  react-hook-form
Material-Smart-Rating
😍⭐⭐Material Smart Rating App - An Android library that encourages users to rate the app on Google Play.⭐⭐😘
Stars: ✭ 30 (-73.45%)
Mutual labels:  material-ui
media-picker
Easy customizable picker for all your needs in Android application
Stars: ✭ 167 (+47.79%)
Mutual labels:  material-ui
GlowButton
Beautify your layouts with glowing buttons. Support with a ⭐️ Contributions are welcome! 🙌
Stars: ✭ 54 (-52.21%)
Mutual labels:  material-ui
react-declarative
A React form builder which interacts with a JSON endpoint to generate nested 12-column grids with input fields and automatic state management in a declarative style. Endpoint is typed by TypeScript guards (IntelliSense available). This tool is based on material-ui components, so your application will look beautiful on any device...
Stars: ✭ 17 (-84.96%)
Mutual labels:  material-ui
material
🎨 Materialize your forum with this Flarum extension that uses the latest guidelines.
Stars: ✭ 14 (-87.61%)
Mutual labels:  material-ui
spax
[WIP] 🚀 a framework for building frameworks
Stars: ✭ 22 (-80.53%)
Mutual labels:  material-ui
twitter-spring-reactjs
🐦 Twitter Clone. Using Java, Spring Boot, PostgreSQL, S3 bucket, JWT, TypeScript, React.js, Redux-Saga, Material-UI
Stars: ✭ 47 (-58.41%)
Mutual labels:  material-ui
spotify-stats
🎧 Your spotify profile's top artists and tracks with charts and playlist creator.
Stars: ✭ 73 (-35.4%)
Mutual labels:  material-ui
website
Official dahliaOS website
Stars: ✭ 29 (-74.34%)
Mutual labels:  material-ui

Material-UI and react-hook-form combined

GitHub Average time to resolve an issue Percentage of issues still open

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

The components are written in TypeScript and attempt an easy integration.

How to use it

Installation

npm install react-hook-form react-hook-form-mui

The dependency of react-hook-form is a peerDependency so don't forget to install it as well.

Important

From versions >= 3.x of this package MUI v5 is in use. Versions of 1 & 2 using Material-UI v4

Your component code

import { FormContainer, TextFieldElement } from 'react-hook-form-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-hook-form-mui

FormContainer creates formContext

The <FormContainer /> 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):

Bundle

This project uses microbundle to wrap the package for npm.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].