npm.io
4.0.0 • Published 4d ago

@nish1896/rhf-mui-components

Licence
MIT
Version
4.0.0
Deps
0
Size
368 kB
Vulns
0
Weekly
0

@nish1896/rhf-mui-components

NPM Version NPM Downloads NPM Downloads Per Month GitHub Release Date - Published_At TypeScript Strict CI

A suite of 25+ reusable Material UI and other third-party components for react-hook-form to minimize your time and effort in creating beautiful forms.

Features

  • Each component is fully functional with just 2-3 props — core logic handled internally.
  • Style individual components or apply global styles via ConfigProvider.
  • Includes well-configured unique components like RichTextEditor, Country Select and File Uploader, saving development time.
  • Provides full control over value validation and transformation before updates are committed to form state.
  • Comprehensive docs showcasing multiple variations for each component.

Version 4 Released

v4 is now available with deeper MUI integration, more consistent callback APIs, stronger accessibility defaults, and new customization options across the component set.

Highlights
  • Supports MUI v6 and v7. MUI v5 support has been removed from v4.
  • Added customOnChange for all components, allowing developers to intercept, validate, or transform values before they are committed to form state.
  • Added external ref forwarding support across supported components.
  • Added customIds and improved element-level ARIA attributes for better accessibility.
  • Added support for freeSolo in RHFAutocomplete and RHFMultiAutocomplete, allowing users to enter values that are not present in the provided options.
  • Added Desktop, Mobile, and Static Date/Time picker variants.
  • RHFFileUploader now supports drag-and-drop uploads, existingFiles, dropZoneProps, and file-specific upload errors.
  • RHFPhoneInput now stores a structured value object with phone, country, dialCode, and phoneNo, and includes searchable country selection.

If you are upgrading from v3, please review the v4 migration guide before updating.

Need MUI v5 support? Continue using the latest v3 release of this package.


Explore and Get Started

Documentation

Access the full documentation for rhf-mui-components, including setup instructions, API references, and examples:

Documentation Site

Interactive Demos

Try out and experiment with the form components in a live environment:

Live Demo Examples

Sample Apps

Clone this repo to explore real-world usage of the package with Next.js and MUI v6 / v7. If you need MUI v5, use the latest v3 version of this package.

Cloneable Example Repo

Form Components List

Below is a comprehensive list of all components included in this package, categorized by module:

This project has been an individual effort so far, and I’d love to invite collaborators to contribute by adding new components or improving the documentation and examples for existing ones. If you're interested, feel free to reach out at nishantkohli96@gmail.com.

You can also check out my eslint config, to format and prettify your javascript code.

Keywords