1.0.5 • Published 4 years ago

lockui v1.0.5

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago

LockUI

Plugin para bloquear la interfaz de usuario con Javascript puro, sin utilizar jQuery. Basado en BlockUI y FreezeUI

Instalación

NPM

$ npm install --save lockui
import UI from 'lockui';

CDN

 <script src="https://unpkg.com/lockui@latest/lockui.js" type="text/javascript"></script>

script

  <script src="/path/to/lockui.js" type="text/javascript"></script>

Uso

Simple

// Bloquear Interfaz de Usuario
UI.lock();

// Desbloquear Interfaz de Usuario
UI.unlock();

Opciones

Puedes establecer algunas opciones cuando llamas la función UI.lock()

ParamTypeDefaultDetails
textstringProcesando...El texto a mostrar.
selectorstring body del documentoElemento a bloquear.

Ejemplos

UI.lock(); // Para bloquear toda la página
UI.lock({ text: 'Custom text' }); // Bloquear con un texto personalizado
UI.lock({ selector: '#component' }); // Bloquear un cierto componente
UI.lock({ selector: '.component', text: 'Getting there...' }) // Usando ambas opciones a la vez. 
UI.unlock(); // Desbloquear la interfaz de usuario

Licence

LockUI está bajo MIT licence