Component

Success Modal

Success feedback modal with animated checkmark, confetti effects, and timestamp details card for completion confirmations.

  • Component
  • Tailwind
  • HTML
  • MIT

Preview

Live component

Interactive preview
Open preview
9:41 100%
devsnips.dev/library/tailwind/components/modals/success-modal/
fluid · no fixed width 100%
No dependencies Production-ready

Install

Add to your project

terminal
npx devsnips add Tailwind/Components/Modals/success-modal
registry path: Tailwind/Components/Modals/success-modal

Source

Implementation

code.html
<!-- Success Modal -->
<div id="success-modal" class="fixed inset-0 z-50 hidden">
  <!-- Backdrop -->
  <div class="fixed inset-0 bg-black/50 backdrop-blur-sm transition-opacity" onclick="closeModal('success-modal')"></div>
  
  <!-- Modal Container -->
  <div class="fixed inset-0 flex items-center justify-center p-4">
    <div class="relative bg-white dark:bg-gray-900 rounded-2xl shadow-2xl w-full max-w-md transform transition-all" role="dialog" aria-modal="true" aria-labelledby="success-modal-title">
      
      <!-- Success Animation -->
      <div class="flex justify-center pt-8">
        <div class="relative">
          <div class="w-20 h-20 bg-emerald-100 dark:bg-emerald-900/30 rounded-full flex items-center justify-center animate-bounce">
            <svg class="w-10 h-10 text-emerald-600 dark:text-emerald-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
              <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7"/>
            </svg>
          </div>
          <!-- Confetti particles -->
          <div class="absolute -top-2 -left-2 w-3 h-3 bg-yellow-400 rounded-full animate-ping"></div>
          <div class="absolute -top-1 -right-3 w-2 h-2 bg-blue-400 rounded-full animate-ping" style="animation-delay: 0.2s;"></div>
          <div class="absolute -bottom-1 -left-4 w-2 h-2 bg-pink-400 rounded-full animate-ping" style="animation-delay: 0.4s;"></div>
        </div>
      </div>
      
      <!-- Content -->
      <div class="p-6 text-center">
        <h3 id="success-modal-title" class="text-2xl font-bold text-gray-900 dark:text-white mb-2">Success!</h3>
        <p class="text-gray-600 dark:text-gray-400 leading-relaxed">Your profile has been updated successfully. The changes will be reflected across your account immediately.</p>
      </div>
      
      <!-- Details Card -->
      <div class="mx-6 mb-6 bg-emerald-50 dark:bg-emerald-900/20 border border-emerald-100 dark:border-emerald-800 rounded-xl p-4">
        <div class="flex items-center gap-3">
          <div class="w-8 h-8 bg-emerald-100 dark:bg-emerald-900/50 rounded-lg flex items-center justify-center">
            <svg class="w-4 h-4 text-emerald-600 dark:text-emerald-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
              <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"/>
            </svg>
          </div>
          <div>
            <p class="text-sm font-medium text-emerald-800 dark:text-emerald-300">Profile Updated</p>
            <p class="text-xs text-emerald-600 dark:text-emerald-500">Aug 3, 2026 at 2:45 PM</p>
          </div>
        </div>
      </div>
      
      <!-- Action -->
      <div class="p-6 pt-0 flex justify-center">
        <button onclick="closeModal('success-modal')" class="px-8 py-3 text-sm font-medium text-white bg-emerald-600 rounded-xl hover:bg-emerald-700 transition-colors focus:outline-none focus:ring-2 focus:ring-emerald-500 shadow-lg shadow-emerald-500/30">Continue</button>
      </div>
    </div>
  </div>
</div>

<!-- Demo Trigger Button -->
<button onclick="openModal('success-modal')" class="px-6 py-3 bg-emerald-600 text-white font-medium rounded-xl hover:bg-emerald-700 transition-colors focus:outline-none focus:ring-2 focus:ring-emerald-500 focus:ring-offset-2">Open Success Modal</button>
55 lines UTF-8 · LF · Spaces: 2

AI-ready

Available to your agent.

This component is reachable through the DevSnips CLI, MCP server and Skills integrations — one registry, one resource path.

Resource path

devsnips://components/modals/success-modal

Continue browsing

View all