<h1 id="sweet-alert-for-bootstrap-5">Sweet Alert for Bootstrap 5</h1>
<p>A <strong>Swetalert</strong> and <strong>Bootbox</strong> alternative build on Bootstrap 5 Modal and Toast components. Do you need Swalstrap for Bootstrap 4? 
<a href="https://github.com/magicbruno/SwalStrap4">Go here</a>.</p>
<h2 id="getting-started">Getting started</h2>
<p>Load Swalstrap form CDN:</p>
<pre><code>&lt;script src=&quot;https://cdn.jsdelivr.net/npm/@magicbruno/swalstrap5@1.0.8/dist/js/swalstrap5_all.min.js&quot;&gt;&lt;/script&gt;
</code></pre>
<p>swalstrap5_all.js will load automatically Swalstrap stylesheet and will create a default instance of Swalstrap named Swal (an aliased as swal, Sweetalert and sweetalert).</p>
<p>You can use Swalstrap applying fire method to the created instance:</p>
<pre><code>&lt;script&gt;
    Swal.fire(&#39;Wanderful!&#39;,&#39;Swalstrap is working!&#39;,&#39;success&#39;)
&lt;/script&gt;
</code></pre>
<p>If you prefer you can load Swalstrap stylesheet (or a customized one) separately:</p>
<pre><code>&lt;link rel=&quot;stylesheet&quot; href=&quot;https://cdn.jsdelivr.net/npm/@magicbruno/swalstrap5@1.0.8/dist/css/swalstrap.min.css&quot;&gt;
</code></pre>
<p>and load swalstrap5.js version:</p>
<pre><code>&lt;script src=&quot;https://cdn.jsdelivr.net/npm/@magicbruno/swalstrap5@1.0.8/dist/js/swalstrap5.min.js&quot;&gt;&lt;/script&gt;
</code></pre>
<p>In this case you must create at least an instance of Swalstrap an then use it to open your popups:</p>
<pre><code>&lt;script&gt;
    // Create an instance 
    const mySwal = new Swalstrap();
    // Then use it for all your popups
    mySwal.fire(&#39;Wanderful!&#39;,&#39;Swalstrap is working!&#39;,&#39;success&#39;);
&lt;/script&gt;
</code></pre>
<h2 id="downloading-swalstrap">Downloading Swalstrap</h2>
<p>You can install package via npm:</p>
<pre><code>npm install @magicbruno/swalstrap5@1.0.8
</code></pre>
<p>clone the git package:</p>
<pre><code>git clone https://github.com/magicbruno/SwalStrap5.git
</code></pre>
<p>or <a href="https://github.com/magicbruno/SwalStrap5/archive/refs/heads/main.zip">download it</a>.</p>
<blockquote>
<h3 id="warning">Warning</h3>
<p>Swalstrap is inspired to Sweetalert NOT a clone. Features are reproduced not copied.
So there are differences. Watch documentation and test examples.</p>
</blockquote>
<ul>
<li><a href="https://magicbruno.github.io/SwalStrap5/api.html">Documentation</a>.</li>
<li><a href="https://magicbruno.github.io/SwalStrap5/basic-examples.html">Examples</a>.</li>
<li><a href="https://magicbruno.github.io/SwalStrap5/custumization.html">Customization example</a>.</li>
</ul>
