# use-input-phone-mask

> ## Installation

Latest version **0.0.6** (published 2022-11-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install use-input-phone-mask
pnpm add use-input-phone-mask
yarn add use-input-phone-mask
bun add use-input-phone-mask
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.6 |
| Published | 2022-11-17 |
| First published | 2022-11-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 8.1 KB |
| Known vulnerabilities | 0 (+3 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Alexsandr Serduck |
| Maintainers | awen2841 |
| Keywords | phone mask, input mask, input phone mask, string mask, input formatting, input phone formatting, phone formatting, string formatting |

## Links

- npm: https://www.npmjs.com/package/use-input-phone-mask
- Repository: https://github.com/awen2841/use-input-phone-mask
- Homepage: https://6372bcd0ee690db14a761db2-ycvwbtcbzk.chromatic.com/
- Issues: https://github.com/awen2841/use-input-phone-mask/issues
- npm.io page: https://npm.io/package/use-input-phone-mask

## Dependencies (2)

- [lodash](https://npm.io/package/lodash.md) 4.17.21
- [use-input-text-mask](https://npm.io/package/use-input-text-mask.md) 0.0.9

## 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

- 0.0.6 (latest) — 2022-11-17
- 0.0.5 — 2022-11-14
- 0.0.4 — 2022-11-14
- 0.0.3 — 2022-11-14
- 0.0.2 — 2022-11-14
- 0.0.1 — 2022-11-14

## README

# useInputPhoneMask

## Installation

#### Yarn

```bash
yarn add use-input-phone-mask
```

#### NPM

```bash
npm install use-input-phone-mask
```

-----
[![npm](https://img.shields.io/npm/v/use-input-phone-mask?style=flat)](https://www.npmjs.com/package/use-input-phone-mask)
-----

Then, require it and use it.

```js
import React from 'react'
import { useInputPhoneMask } from 'use-input-phone-mask';

export default () => {
  const { ref: inputRef, onChange } = useInputPhoneMask({ mask: '+# (###)###-####' });
  
  return (
    <div>
      <input ref={inputRef} onChange={onChange} />
    </div>
  )
}
```

## Example

To see an example of the code running, follow these steps:

1. Clone the repo, `git clone https://github.com/awen2841/use-input-phone-mask.git`
1. `cd use-input-phone-mask/exemple`
1. `npm install`
1. `npm run storybook`
1. Open [http://localhost:6001](http://localhost:6001)

The code of the example is in [`exemple`](https://6372bcd0ee690db14a761db2-ycvwbtcbzk.chromatic.com/).

---
_Source: https://npm.io/package/use-input-phone-mask · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
