live-controls/masks

Input Masks library for live-controls
2,067
Install
composer require live-controls/masks
Latest Version:v2.2.2
Last Updated:May 13, 2024
Links: GitHub  ·  Packagist
Maintainer: daredloco

Masks

Release Version Packagist Version Input Masks library for live-controls

Requirements

  • Laravel 9+
  • Livewire 2+

Translations

  • English (en)
  • German (de)
  • Brazilian Portuguese (pt_BR)

Installation

  1. Install Masks package
composer require live-controls/masks

CDN Installation

  1. Include @livecontrolsMasks() before /head tag
  2. In case you did publish the configuration file, set local_files to false (This is the default option)

Local Installation

  1. Run:
npm install imask
  1. Add to app.js:
import IMask from 'imask';
  1. Run:
npm run build;
  1. Run:
php artisan vendor:publish --tag="livecontrols.masks.config";
  1. Edit config/livecontrols-masks.php:
'local_files' => true, //Set local_files to true

Usage

@livewire('livecontrols-currencymask', [
'maskId' => 'someUniqueId',
'maskName' => 'someUniqueName',
'unmaskedId' => 'idforhiddeninput',
'unmaskedName' => 'nameforhiddeninput',
'class' => 'input input-bordered w-full',
'required' => true,
'value' => 'set to something if you want to use it for update',
'currencyString' => 'R$',
'updateCallName' => 'WillBeFiredIfValueGotUpdated'
], key())

To update a value call:

$this->dispatch('update-mask-value-maskId', value: 500);

Related Packages

livewire/flux

The official UI component library for Livewire.

10,948,284 976
infyomlabs/adminlte-templates

AdminLTE templates for InfyOm Laravel Generator

1,640,521 266
garygreen/pretty-routes

Pretty routes for Laravel 5+

1,376,906 649
infyomlabs/swagger-generator

Swagger Generator for InfyOm Laravel Generator

1,120,968 114
snowfire/beautymail

Send beautiful html emails with Laravel

769,772 1,313