# Installation
## With bundler
```sh
npm install maska
```
### **Vanilla JS**
And then import it in your code:
```js
import { Mask, MaskInput } from 'maska'
new MaskInput("[data-maska]") // for masked input
const mask = new Mask({ mask: "#-#" }) // for programmatic use
```
### **Alpine**
And then register it as custom plugin:
```js
import Alpine from 'alpinejs'
import { xMaska } from 'maska/alpine'
Alpine.plugin(xMaska)
```
### **Svelte**
And then use it in your `.svelte` component:
```svelte
```
### **Vue**
And then use it in your `.vue` component:
```js
```
## From CDN
### **Vanilla JS**
You can use Maska directly from CDN with a simple script tag as UMD-build.
Library API will be exposed on the global `Maska` object:
```html
```
### **Alpine**
Include Maska from CDN, just make sure to include it **before** Alpine's core JS file:
```html
```
This will automatically register Maska plugin inside Alpine.
### **Vue**
You can use Maska directly from CDN and register directive:
```html
```
## With importmap
For modern browsers you can use ES modules build with (optional) [import maps](https://caniuse.com/import-maps):
### **Vanilla JS**
```html
```
### **Alpine**
```html
```
### **Vue**
```html
```
?> Notice that we are using `