react-hook-format
TypeScript icon, indicating that this package has built-in type declarations

1.1.8 • Public • Published

Features

  • Built with a focus on performance and usability
  • Use in native HTML form
  • Simplify number and field formatting

Install

npm install react-hook-format

Quickstart

import { useFormat } from 'react-hook-format';

function App() {
  const { pattern } = useFormat();

  return (
    <form>
      <input name="document" {...pattern('###.###.###-##')} />
      <input name="price" {...pattern('R$#.###,##')} />
      <input type="submit" />
    </form>
  );
}

Contributors

Thank you for being amazing people!

Package Sidebar

Install

npm i react-hook-format

Weekly Downloads

1

Version

1.1.8

License

ISC

Unpacked Size

12.7 kB

Total Files

26

Last publish

Collaborators

  • codefromhuman