Skip to content
This repository has been archived by the owner on Nov 25, 2023. It is now read-only.
/ react-all-mask Public archive

An input masking package for React developers is a tool or library that helps control and format user input in input fields.

License

Notifications You must be signed in to change notification settings

mehmethalis/react-all-mask

Repository files navigation

react-all-mask

An input masking package for React developers is a tool or library that helps control and format user input in input fields. It's particularly useful when you want to enforce a specific pattern or structure for the data being entered, such as phone numbers, dates, credit card numbers, or other custom formats.

Installation

Use the package manager pnpm / yarn / npm to install foobar.

pnpm install react-all-mask

Usage

import * as React from 'react'
import { useReactAllMask, Mask } from 'react-all-mask'

export default function App() {
  const [ref] = useReactAllMask<HTMLInputElement>({ mask: Mask.number })
  return (
    <div>
      <input placeholder="Type..." id="inputEl" ref={ref} />
    </div>
  )
}

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

Playground

$ pnpm dev

image host

License

MIT

About

An input masking package for React developers is a tool or library that helps control and format user input in input fields.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published