</> ConvertAtlas Developer Tools
Bootstrap 5 · Intermediate

SweetAlert2 Toast & Prompt

A corner toast and a text-input prompt, via SweetAlert2.

Requires Bootstrap 5, SweetAlert2. Add the CDN tags below to your page (styles in <head>, scripts before </body>). The downloaded file already includes them.
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
<div class="d-flex gap-2"><button class="btn btn-primary" id="stOk">Toast notify</button><button class="btn btn-outline-primary" id="stInput">Prompt input</button></div>
document.getElementById('stOk').onclick=function(){Swal.fire({toast:true,position:'top-end',icon:'success',title:'Item added',showConfirmButton:false,timer:2000})};
document.getElementById('stInput').onclick=function(){Swal.fire({title:'Your name?',input:'text',showCancelButton:true}).then(function(r){if(r.value)Swal.fire('Hi '+r.value+'!','','success')})};
Free to use.This component uses Bootstrap 5, SweetAlert2 (linked above). Copy any file, or download a ready-to-open .html page with the CDN links already included.