Skip to content

10+ Free Bootstrap & Tailwind Modal Templates

Dialog windows and lightboxes.

14 components

Multi-Step Modal Dialog – free Tailwind CSS modal template

Multi-Step Modal Dialog

Tailwind CSS modal with a three-step wizard: template picker, validated details form and review, plus stepper, focus trap and Escape to close.

Product Quick View Modal with Photo – free Bootstrap 5 modal template

Product Quick View Modal with Photo

Bootstrap 5 product quick view modal with photo, rating, material and size options that update price and image, quantity stepper and add to cart.

Multi-Step Wizard Dialog – free Bootstrap 6 modal template

Multi-Step Wizard Dialog

Bootstrap 6 Dialog wizard with three steps, a Stepper and progress bar, back/next buttons, per-step validation, Chips email invites and a review screen.

Newsletter Popup Dialog – free Bootstrap 6 modal template

Newsletter Popup Dialog

Bootstrap 6 Dialog newsletter popup with a photo side, email signup with validation, a don't-show-again option, delayed auto-open and a confirmation state.

Image Lightbox Dialog – free Bootstrap 6 modal template

Image Lightbox Dialog

Dark Bootstrap 6 Dialog lightbox that opens gallery thumbnails large, with previous/next buttons, arrow-key and swipe navigation, captions and a photo counter.

Fullscreen Dialog on Mobile – free Bootstrap 6 modal template

Fullscreen Dialog on Mobile

Dark Bootstrap 6 Dialog for notification settings that is centered on desktop, fullscreen on phones, with a scrollable body of switches and a sticky footer.

Login Dialog with Social Buttons – free Bootstrap 6 modal template

Login Dialog with Social Buttons

Bootstrap 6 Dialog login form with Google, Apple and GitHub sign-in buttons, email and password fields, show-password toggle, validation and a success state.

Confirm Delete Dialog – free Bootstrap 6 modal template

Confirm Delete Dialog

Dark Bootstrap 6 Dialog that confirms deleting a file, with danger theme, focus on Cancel, per-row triggers, a loading state, row removal and an Undo toast.

Dialog Modal with Form – free Bootstrap 6 modal template

Dialog Modal with Form

Bootstrap 6 Dialog with a validated invite form: name, email, role select, note counter and switch, with cancel and save actions, loading state and success toast.

Native dialog Modal – free Pure CSS modal template

Native dialog Modal

Accessible modal built on the native HTML dialog element with @starting-style enter and exit animation, blurred backdrop, mobile bottom sheet and an invite form.

Login Modal – free Bootstrap 5 modal template

Login Modal

Bootstrap 5 login modal with social sign-in buttons, floating labels, a show/hide password toggle, client-side validation and a signed-in success view.

Delete Confirmation Modal – free Bootstrap 5 modal template

Delete Confirmation Modal

Dark Bootstrap 5 modal that confirms deleting an item by typing its exact name, with per-row triggers, a loading state and removal of the deleted row.

Modal Dialog – free Tailwind CSS modal template

Modal Dialog

Accessible Tailwind CSS modal dialog with focus trap, Escape and backdrop close, scroll lock and a type-to-confirm delete action.

What is a modal?

A modal is a dialog window that appears on top of the page and blocks interaction with the content behind it until the user responds or closes it. Modals are used for confirmations ("Delete this file?"), short forms such as sign-in or newsletter signup, image lightboxes, terms and detailed previews. Because they interrupt the user, they work best for focused, short tasks.

When to use a modal

  • Use a modal when the user must make a decision or provide input before continuing.
  • Keep content short; long forms or multi-page flows are better as a separate page or a drawer.
  • Avoid opening modals automatically on page load, which most visitors find intrusive.
  • On small screens, let the modal grow to nearly full width or become a full-screen sheet.

Accessibility essentials

The native <dialog> element opened with showModal() handles much of the hard work: it traps focus, makes the background inert and closes on Escape. If you build a custom modal, add role="dialog", aria-modal="true" and aria-labelledby pointing to the title, move focus into the dialog on open, keep focus inside while it is open, and return focus to the trigger on close. Always provide a visible close button with an accessible label, and make sure the backdrop does not hide a scrollable page that still scrolls underneath.

Bootstrap 6, Bootstrap 5, Tailwind CSS and pure CSS

These bootstrap modal examples and modal popup HTML CSS snippets cover Bootstrap 6, Bootstrap 5, Tailwind CSS and pure CSS. Bootstrap 6 modals are built on the native <dialog> element and loaded as an ES module, while Bootstrap 5 modals use the modal component with data-bs-toggle. Tailwind and pure CSS versions use <dialog> with a small script or none at all. Open each example in the live preview, then copy the HTML, CSS and JS from the code tabs or download it and replace the content with your own.