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: about 2 months ago
JSON representation
Simple, No Dependences, Mobile Compatibility, IE Compatibility Only 1kb (gzip) = ♥
- Host: GitHub
- URL: https://github.com/figuarnieri/maskfy
- Owner: figuarnieri
- License: mit
- Created: 2017-08-23T21:35:13.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-08-10T15:41:25.000Z (about 6 years ago)
- Last Synced: 2024-07-29T11:35:04.210Z (2 months ago)
- Topics: 1kb, data-mask, input-mask, inputmask, javascript, mask, nojquery
- Language: HTML
- Homepage: https://figuarnieri.github.io/maskfy
- Size: 36.1 KB
- Stars: 14
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
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
```htmlor
```
### HTML _(by class or attribute)_
Insert a selector in class tag
```htmlor
```
### Javascript Options
```javascriptnew 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/)