Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

https://github.com/figuarnieri/maskfy

Simple, No Dependences, Mobile Compatibility, IE Compatibility Only 1kb (gzip) = ♥
https://github.com/figuarnieri/maskfy

1kb data-mask input-mask inputmask javascript mask nojquery

Last synced: 3 months ago
JSON representation

Simple, No Dependences, Mobile Compatibility, IE Compatibility Only 1kb (gzip) = ♥

Lists

README

        

# Maskfy (2.0.0) - Input Mask Simple
A Javascript library without a dependency of jQuery, Zepto, and etc ... Very simple to install and use. With only 1kb (gzip) code, IE Compatibility, it's also well accepted on mobile devices
## Install / Usage
Add Maskfy file
```html

or

```
### HTML _(by class or attribute)_
Insert a selector in class tag
```html

or

```
### Javascript Options
```javascript

new Maskfy({
tag: '[data-maskfy]', //{String: undefined} (required) selector input
mask: '999.999.999,99', //{String: undefined} (required) input mask pattern
reverse: true, //{Boolean: false} reverse typing
minSize: 3 //{Number: false} minimum digits
defaultValue: '123' //{String: undefined} initial value
letters: true //{Boolean: false} allowed letters
after: (input) => console.log(input) //{Function: undefined} after input event
});

```
## HTML attributes [data-*]
If necessary, you could add attributes in the tag, to configure your mask options

### data-maskfy
```html

```
### data-maskfy-reverse
```html

```
### data-maskfy-minsize
```html

```
### data-letters
```html

```
### default value
```html

```

## Source
[Github](https://github.com/figuarnieri/maskfy) | [npm](https://www.npmjs.com/package/maskfy) | [React](https://www.npmjs.com/package/react-maskfy) | [Example](https://figuarnieri.github.io/maskfy/) | [@figuarnieri](https://twitter.com/figuarnieri)

## License
The MIT License
Copyright 2018 © [Filipe Guarnieri](https://figuarnieri.github.io/)