Skip to content

Confirmation dialog in Tailwind CSS

A small window asking to confirm an action before running it.

Here is an excerpt of this component's code in Tailwind CSS. The full code is free for members, ready to copy into your project.

This component also comes in

Open in a new tab

The code in Tailwind CSS

index.html
<!doctype html>
<html lang="fr">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>Fenêtre de confirmation</title>
    <script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4.3.3"></script>
    <style type="text/tailwindcss">
      @custom-variant dark {
        @media (prefers-color-scheme: dark) {
          &:where(:root:not([data-theme="light"]), :root:not([data-theme="light"]) *) {
            @slot;

Free component: copy it freely, including for commercial projects.

Modals components in Tailwind CSS
  • A legal-age check window for a wine shop or brewery, accessible, remembered for the session and with the French Evin law notices.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • A search covering the page, with popular suggestions, opened from the navigation bar.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • A short form in a window to request a call from an advisor.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component