Biblioteca de notificaciones de Growl de JavaScript nativo-Vanilla Notify

Tiempo de ejecución: 30 minutos. Empezar

Autor: MLaritz
Views Total: 2,868
Sitio oficial: Ir a la web
Actualizado: March 6, 2017
Licencia: MIT

Vista prévia

Biblioteca de notificaciones de Growl de JavaScript nativo-Vanilla Notify

Descripción

Una biblioteca de notificaciones de JavaScript vainilla que le permite mostrar alertas y notificaciones de estilo de Growl a los usuarios.

Main features:

  • Se puede colocar en cualquier lugar de la Página Web.
  • Animaciones de fundido/salida configurables.
  • Cierre automático después de un tiempo de espera determinado.
  • 5 tipos de notificación: en, éxito, ADVERTENCIA, error y pegajoso.

Funcionamiento

En primer lugar, debe cargar los archivos JS y la hoja de estilos de Vanilla Notify en el documento HTML.

<link rel="stylesheet" href="vanilla-notify.css">
<script src="vanilla-notify.js"></script>

Mostrar notificaciones predeterminadas en su página web.

vNotify.info({text:'This is an info notification.', title:'Info Notification.'});
vNotify.success({text:'This is a success notification.', title:'Success Notification.'});
vNotify.warning({text:'This is a warning notification.', title:'Warning Notification.'});
vNotify.error({text:'This is an error notification.', title:'Error Notification.'});
vNotify.notify({text:'This is a notify notification.', title:'Notify Notification.'});

Más opciones de configuración para personalizar las notificaciones.

vNotify.info({

text:'This is an info notification.',

 title:'Info Notification.',

fadeInDuration: 1000,

fadeOutDuration: 1000,

fadeInterval: 50,

visibleDuration: 5000, // auto close after 5 seconds

postHoverVisibleDuration: 500,

position: "topRight", // topLeft, bottomLeft, bottomRight, center

sticky: false, // is sticky

showClose: true // show close button
});

Te puede interesar: