npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

ngx-simpli-alert

v19.0.0

Published

Una librería Angular simple y elegante para mostrar alertas modales personalizables con animaciones suaves y múltiples tipos de mensajes.

Readme

NgxSimpliAlert

Una librería Angular simple y elegante para mostrar alertas modales personalizables con animaciones suaves y múltiples tipos de mensajes.

Angular TypeScript npm License

🚀 Características

  • Fácil de usar: Integración simple con solo unas líneas de código
  • 🎨 Múltiples tipos: Success, Warning, Danger y Question
  • 🎭 Animaciones: Transiciones suaves con CSS animations
  • 📱 Responsive: Diseño adaptativo para dispositivos móviles
  • 🔧 Personalizable: Títulos, descripciones y botones configurables
  • 🚫 Sin dependencias: Solo requiere Angular core y common
  • 🎯 TypeScript: Completamente tipado para mejor experiencia de desarrollo

📦 Instalación

npm install ngx-simpli-alert

📋 Tabla de Compatibilidad de Versiones

| NgxSimpliAlert | Angular | TypeScript | Node.js | Estado | |----------------|---------|------------|---------|---------| | 19.0.x | 19.x | 5.6+ | 18+ | ✅ Actual | | 18.0.x | 18.x | 5.5+ | 18+ | 🔄 Mantenimiento | | 17.0.x | 17.x | 5.2+ | 18+ | 📋 Planificado |

Notas de Compatibilidad

  • Angular 19: ✅ Versión actual - Soporte completo con todas las características más recientes, signals estables, y las últimas mejoras de Angular
  • Angular 18: 🔄 Compatible con retrocompatibilidad y mantenimiento
  • Angular 17: 📋 Soporte planificado para mayor alcance

🛠️ Configuración

1. Importar el servicio

import { NgxSimpliAlertService } from 'ngx-simpli-alert';

@Component({
  selector: 'app-example',
  templateUrl: './example.component.html'
})
export class ExampleComponent {
  constructor(private alertService: NgxSimpliAlertService) {}
}

2. Usar en tu componente

showSuccessAlert() {
  this.alertService.show({
    title: '¡Éxito!',
    description: 'La operación se completó correctamente',
    type: 'success',
    confirmButtonText: 'Aceptar'
  });
}

showConfirmAlert() {
  this.alertService.show({
    title: '¿Estás seguro?',
    description: 'Esta acción no se puede deshacer',
    type: 'question',
    confirmButtonText: 'Sí, continuar',
    cancelButtonText: 'Cancelar'
  }, 
  () => {
    // Acción al confirmar
    console.log('Confirmado');
  },
  () => {
    // Acción al cancelar
    console.log('Cancelado');
  });
}

📋 API Reference

AlertOptions Interface

| Propiedad | Tipo | Requerido | Descripción | |-----------|------|-----------|-------------| | title | string | No | Título principal de la alerta | | description | string | No | Descripción o mensaje de la alerta | | type | 'success' \| 'danger' \| 'question' \| 'warning' | No | Tipo de alerta (por defecto: 'success') | | confirmButtonText | string | No | Texto del botón de confirmación | | cancelButtonText | string | No | Texto del botón de cancelación | | isActive | boolean | No | Estado de visibilidad (manejado internamente) |

NgxSimpliAlertService

Métodos

show(options: AlertOptions, onConfirm?: () => void, onCancel?: () => void)

Muestra una alerta modal con las opciones especificadas.

Parámetros:

  • options: Configuración de la alerta
  • onConfirm (opcional): Callback ejecutado al confirmar
  • onCancel (opcional): Callback ejecutado al cancelar

🎨 Tipos de Alertas

Success

this.alertService.show({
  title: '¡Operación exitosa!',
  description: 'Los datos se guardaron correctamente',
  type: 'success',
  confirmButtonText: 'Entendido'
});

Warning

this.alertService.show({
  title: 'Advertencia',
  description: 'Algunos campos requieren atención',
  type: 'warning',
  confirmButtonText: 'Revisar'
});

Danger

this.alertService.show({
  title: 'Error',
  description: 'No se pudo completar la operación',
  type: 'danger',
  confirmButtonText: 'Intentar de nuevo'
});

Question

this.alertService.show({
  title: '¿Eliminar elemento?',
  description: 'Esta acción no se puede deshacer',
  type: 'question',
  confirmButtonText: 'Eliminar',
  cancelButtonText: 'Cancelar'
}, 
() => this.deleteItem(),
() => console.log('Cancelado')
);

🎯 Ejemplos Avanzados

Alerta con solo título

this.alertService.show({
  title: 'Mensaje simple',
  type: 'success'
});

Manejo de promesas

async confirmAction() {
  return new Promise((resolve) => {
    this.alertService.show({
      title: '¿Continuar?',
      description: 'Esta acción modificará los datos',
      type: 'question',
      confirmButtonText: 'Sí',
      cancelButtonText: 'No'
    },
    () => resolve(true),
    () => resolve(false)
    );
  });
}

// Uso
const confirmed = await this.confirmAction();
if (confirmed) {
  // Ejecutar acción
}

🎨 Personalización de Estilos

La librería incluye estilos por defecto, pero puedes sobrescribirlos en tu CSS global:

/* Personalizar el fondo del modal */
.alert-background {
  background-color: rgba(0, 0, 0, 0.5) !important;
}

/* Personalizar el contenido de la alerta */
.alert-content {
  border-radius: 10px !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
}

/* Personalizar botones */
.alert-content button {
  border-radius: 8px !important;
  font-weight: bold !important;
}

📝 Changelog

v19.0.0 (2025-10-26)

  • 🎉 Lanzamiento inicial
  • ✨ Soporte para Angular 19
  • 🎨 4 tipos de alertas (success, warning, danger, question)
  • 🎭 Animaciones CSS suaves
  • 📱 Diseño responsive
  • 🔧 API completa con callbacks
  • 🚀 Compatibilidad con signals estables

🤝 Contribuir

Las contribuciones son bienvenidas. Por favor:

  1. Fork el proyecto
  2. Crea una rama para tu feature (git checkout -b feature/nueva-funcionalidad)
  3. Commit tus cambios (git commit -am 'Agregar nueva funcionalidad')
  4. Push a la rama (git push origin feature/nueva-funcionalidad)
  5. Abre un Pull Request

📄 Licencia

Este proyecto está bajo la licencia MIT. Ver el archivo LICENSE para más detalles.

📞 Soporte

Si encuentras algún problema o tienes preguntas:

  • Abre un issue
  • Consulta la documentación
  • Revisa los ejemplos de uso

Desarrollado con ❤️ para la comunidad Angular