deadsimple / hyva-input-mask
A deadsimple wrapper to use the input mask plugin from AlpineJs directly in you Hyvä theme and forms
Installs: 6
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
Language:HTML
Type:magento2-module
pkg:composer/deadsimple/hyva-input-mask
Requires
- hyva-themes/magento2-default-theme: *
README
Deadsimple Hyva Input Mask Module using AlpineJs Plugin
This module is a simple wrapper to integrate the input mask plugin from AlpineJs directly into your Hyvä theme and forms. It allows you to easily apply input masks to form fields, enhancing user experience and data validation.
Installation
To install the module, follow these steps:
- Install the module using Composer:
composer require deadsimple/hyva-inputmask
- Enable the module:
bin/magento module:enable DeadSimple_HyvaInputMask
- Run the setup upgrade:
bin/magento setup:upgrade
Usage
To use the input mask plugin, you need to add the x-mask attribute to your input field. The value of the x-mask attribute should be a valid mask pattern. For example:
<input type="text" x-mask="999-999-9999" />
This will apply a phone number mask to the input field, allowing only digits and formatting them as 999-999-9999.
For more information on the available mask patterns and options, refer to the AlpineJs Mask Plugin Documentation.
License
This module is licensed under the MIT License. See the LICENSE file for more information.