Bonus

Toast notification

Floating success message

Live preview

The prompt

Build a toast notification with Tailwind CSS: a floating card fixed to the bottom-right with an icon dot, a title, a short description, a close button, and a thin timer bar along the bottom. Use a subtle shadow and rounded-xl. Then add JavaScript exposing a small toast(title, message, variant) function that clones a hidden template into a stack, so several toasts can sit above one another, each sliding in, counting its timer bar down over five seconds, then sliding out and removing itself — pausing the countdown while the pointer is over it, and dismissing immediately on the close button. Include success and error variants that swap the icon colours.

Paste it into Claude, Cursor, v0 or any AI coding tool. Prefer the finished markup? .

Build a toast notification with Tailwind CSS: a floating card fixed to the bottom-right with an icon dot, a title, a short description, a close button, and a thin timer bar along the bottom. Use a subtle shadow and rounded-xl. Then add JavaScript exposing a small toast(title, message, variant) function that clones a hidden template into a stack, so several toasts can sit above one another, each sliding in, counting its timer bar down over five seconds, then sliding out and removing itself — pausing the countdown while the pointer is over it, and dismissing immediately on the close button. Include success and error variants that swap the icon colours.