# ngx-mask-input

> [![NPM Version](https://img.shields.io/npm/v/ngx-mask-input.svg?style=flat-square)](https://www.npmjs.com/package/ngx-mask-input) [![NPM Size + Gzip](https://img.shields.io/bundlephobia/minzip/ngx-mask-input.svg?style=flat-square)](https://www.npmjs.com/p

Latest version **1.0.1** (published 2021-04-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install ngx-mask-input
pnpm add ngx-mask-input
yarn add ngx-mask-input
bun add ngx-mask-input
```

## Health

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

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2021-04-12 |
| First published | 2018-08-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 37.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Zura Gabievi |
| Maintainers | npm-zgabievi, kvirrik |
| Keywords | mask, input mask, mask input, input filter |

## Links

- npm: https://www.npmjs.com/package/ngx-mask-input
- Repository: https://github.com/zgabievi/ngx-mask-input
- Homepage: https://github.com/zgabievi/ngx-mask-input#readme
- Issues: https://github.com/zgabievi/ngx-mask-input/issues
- npm.io page: https://npm.io/package/ngx-mask-input

## Dependencies (1)

- [tslib](https://npm.io/package/tslib.md) ^2.0.0

## Recent versions

- 1.0.1 (latest) — 2021-04-12
- 1.0.0 — 2021-04-12
- 0.1.7 — 2018-11-30
- 0.1.6 — 2018-11-20
- 0.1.5 — 2018-11-19
- 0.1.4 — 2018-11-07
- 0.1.3 — 2018-11-07
- 0.1.2 — 2018-08-17
- 0.1.1 — 2018-08-16
- 0.1.0 — 2018-08-16

## README

# ngx-mask-input

[![NPM Version](https://img.shields.io/npm/v/ngx-mask-input.svg?style=flat-square)](https://www.npmjs.com/package/ngx-mask-input)
[![NPM Size + Gzip](https://img.shields.io/bundlephobia/minzip/ngx-mask-input.svg?style=flat-square)](https://www.npmjs.com/package/ngx-mask-input)
[![NPM Downloads](https://img.shields.io/npm/dt/ngx-mask-input.svg?style=flat-square)](https://www.npmjs.com/package/ngx-mask-input)
[![NPM License](https://img.shields.io/npm/l/ngx-mask-input.svg?style=flat-square)](https://www.npmjs.com/package/ngx-mask-input)


Library helps you to prevent users from **writing** or **pasting** values in inputs, that you don't want to allow. You can pass regular expression to your inputs "mask" attribute, and the things will be managed by itself.

## Table of Contents
- [Installation](#installation)
- [Usage](#usage)
- [Changelog](#changelog)
- [Paperwork](#paperwork)
  - [Contributing](#contributing)
  - [Issue / Feature Request](#issue--feature-request)
  - [Pull Request](#pull-request)
- [Credits](#credits)
- [License](#license)

## Installation

```bash
npm install --save ngx-mask-input
```

```bash
yarn add ngx-mask-input
```

## Usage

**app.module.ts**

```ts
import { NgModule } from '@angular/core';
import { NgxMaskInputModule } from 'ngx-mask-input';

import { AppComponent } from './app.component';

@NgModule({
  declarations: [ AppComponent ],
  imports: [ NgxMaskInputModule ],
  bootstrap: [ AppComponent ]
})
export class AppModule { }
```

**app.component.html**

```html
<!-- Allow only numbers -->
<input type="text" mask="[0-9]">

<!-- Allow only lowercase letters -->
<input type="text" mask="[a-z]">

<!-- Allow only latin letters, numbers and underscore -->
<input type="text" mask="[a-zA-Z0-9_]">
```

## Changelog

Please see [Changelog Page](https://github.com/zgabievi/ngx-mask-input/releases) for more information what has changed recently.

## Paperwork

### Contributing

Please see [CONTRIBUTING.md](https://github.com/zgabievi/ngx-mask-input/blob/master/CONTRIBUTING.md) for details.

### Issue / Feature Request

To submit an issue correctly, please follow [instructions](https://github.com/zgabievi/ngx-mask-input/blob/master/.github/ISSUE_TEMPLATE.md#bug-report)

If you have an idea, and you want to request feature, then read [this one](https://github.com/zgabievi/ngx-mask-input/blob/master/.github/ISSUE_TEMPLATE.md#feature-request)

### Pull Request

To crearte new pull request and add your piece of work in our project, go through this [steps](https://github.com/zgabievi/ngx-mask-input/blob/master/.github/PULL_REQUEST_TEMPLATE.md)

## Credits

- [Zura Gabievi](https://github.com/zgabievi)
- [Giorgi Kvirikashvili](https://github.com/kvirrik)
- [All contributors](https://github.com/zgabievi/ngx-mask-input/graphs/contributors)

## License

The MIT License (MIT). Please see [License file](https://github.com/zgabievi/ngx-mask-input/blob/master/LICENSE) for more information.

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