# Sweet Alerts

[SweetAlert](https://sweetalert2.github.io/) is a great package to show custom and beautifully designed alerts, prompts etc. It can afford custom CSS in the UI as well as in animation, which makes it a cool feature to be added to almost all your mobile and web apps.

![](/files/-LugcmifEUWuFP1CjPeY)

![](/files/-LugcmioOCrl0wJBeqxa)

![](/files/-LugcmiqZkLpQ9qqjIRL)

## Installation

The package can be installed with npm using

```
$ npm install sweetalert2
```

Usage

You can import Sweetalert in your page using

```
import Swal from 'sweetalert2';
```

and then show a custom alert using something like this (JSON options can be modified as you want. Check [this](https://sweetalert2.github.io/#configuration) for more options)

```
Swal.fire(
      {
        title: 'Good job!',
        text: 'You clicked the button!',
        type: 'success',
        heightAuto: false
      }
    );
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://enappd.gitbook.io/capacitor-full-app-ionic-angular/features/pro-features/pro-addons/sweet-alerts.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
