Documentation > JavaScript API > Constructor
Creating an instance by providing an input field, it can be either HTML selector
or the dom element
.
The options
is an object documented in the Options section.
With the instance created, you can call these Public methods.
var cleave = new Cleave('.my-input', {
creditCard: true
});