Read on how to do it in this tutorial: https://www.w3schools.com/howto/howto_js_snackbar.asp
Snackbar / Toast
Snackbars are often used as tooltips/popups to show a message at the bottom of the screen.
Click on the button to show the snackbar. It will disappear after 3 seconds.
This message appears when clicking.
Try it yourself here: https://www.w3schools.com/howto/tryit.asp?filename=tryhow_js_snackbar