Modal Dialog

Free Cards

Elegant modal for confirmations and alerts

Live preview

Open preview in a new tab (new tab)

Code

HTML

<div class="modal-preview">
    <h4>Confirm Action</h4>
    <p>Are you sure you want to proceed with this action?</p>
    <div class="buttons">
        <button class="btn-secondary">Cancel</button>
        <button class="btn-primary">Confirm</button>
    </div>
</div>
CSS
.modal-preview {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    border: 1px solid #e5e7eb;
    width: 70%;
}

.modal-preview h4 {
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 14px;
}

.modal-preview p {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 1rem;
}

.modal-preview .buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.modal-preview button {
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 12px;
}

.modal-preview .btn-primary {
    background: #4f46e5;
    color: white;
    border: none;
}

.modal-preview .btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

This snippet has no JavaScript.

Cards
Free

Profile Card

A clean and modern user profile card with avatar, social links, and bio section. Perfect for user profiles, team pages, or portfolio websites. Fully responsive and customizable.

  • HTML
  • CSS
  • JavaScript
  • Components
  • Font Awesome
Cards
Cards
Free

Content Card

Modern card layouts for content display

  • HTML
  • CSS
Cards
Cards
Free

Pricing Card

Clean pricing component for SaaS products

  • HTML
  • CSS
Cards