Notifications

3 new
MS

Marcus Silva assigned you to Q3 Revenue Report

10 minutes ago

EW

Emma Wilson commented on Homepage Redesign

45 minutes ago

JM

James Miller mentioned you in Sprint Planning

2 hours ago

SC

Sarah Chen uploaded Q2 Analytics Deck

3 hours ago

DK

David Kim requested review on API Integration PR

5 hours ago

View all notifications

Modals

Modal dialog examples.

Basic Modal

<!-- Trigger button -->
<button @click="$dispatch('open-basic-modal')"
  class="bg-alpine-500 hover:bg-alpine-600 text-white px-4 py-2 rounded-lg text-sm font-medium">
  Open Modal
</button>

<!-- Modal overlay (place before </body>) -->
<div id="basicModal" x-data="{ open: false }" x-show="open" x-cloak @open-basic-modal.window="open = true" @click.self="open = false" class="fixed inset-0 z-50 flex items-center justify-center bg-black/50">
  <div class="bg-white rounded-xl shadow-2xl w-full max-w-md mx-4 overflow-hidden"
       @click.stop>
    <!-- Header -->
    <div class="flex items-center justify-between px-5 py-4 border-b border-gray-100">
      <h3 class="text-lg font-semibold text-alpine-900">Modal Title</h3>
      <button @click="open = false"
              class="p-1 rounded-lg hover:bg-gray-100">
        <svg class="w-5 h-5 text-gray-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
          <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"/>
        </svg>
      </button>
    </div>
    <!-- Body -->
    <div class="p-5">
      <p class="text-sm text-gray-600 leading-relaxed">Modal body content here.</p>
    </div>
    <!-- Footer -->
    <div class="px-5 py-4 border-t border-gray-100 flex justify-end gap-3">
      <button @click="open = false"
              class="px-4 py-2 rounded-lg border border-gray-200 text-sm font-medium text-gray-700 hover:bg-gray-50">Cancel</button>
      <button @click="open = false"
              class="px-4 py-2 rounded-lg bg-alpine-500 hover:bg-alpine-600 text-white text-sm font-medium">Confirm</button>
    </div>
  </div>
</div>

<!-- Close on overlay click is handled by @click.self on the overlay -->

Small Modal

<!-- Same structure as Basic Modal, use max-w-sm for compact dialogs -->
<button @click="$dispatch('open-small-modal')"
  class="bg-alpine-500 hover:bg-alpine-600 text-white px-4 py-2 rounded-lg text-sm font-medium">
  Open Small Modal
</button>

<div id="smallModal" x-data="{ open: false }" x-show="open" x-cloak @open-small-modal.window="open = true" @click.self="open = false" class="fixed inset-0 z-50 flex items-center justify-center bg-black/50">
  <div class="bg-white rounded-xl shadow-2xl w-full max-w-sm mx-4 overflow-hidden"
       @click.stop>
    <!-- Header with close button, body, footer with actions -->
  </div>
</div>

Large Modal

<!-- Same structure as Basic Modal, use max-w-2xl px-6 for larger dialogs -->
<button @click="$dispatch('open-large-modal')"
  class="bg-alpine-500 hover:bg-alpine-600 text-white px-4 py-2 rounded-lg text-sm font-medium">
  Open Large Modal
</button>

<div id="largeModal" x-data="{ open: false }" x-show="open" x-cloak @open-large-modal.window="open = true" @click.self="open = false" class="fixed inset-0 z-50 flex items-center justify-center bg-black/50">
  <div class="bg-white rounded-xl shadow-2xl w-full max-w-2xl mx-4 overflow-hidden"
       @click.stop>
    <div class="flex items-center justify-between px-6 py-4 border-b border-gray-100">
      <h3 class="text-lg font-semibold text-alpine-900">Large Modal</h3>
      <button @click="open = false" class="p-1 rounded-lg hover:bg-gray-100"><!-- X icon --></button>
    </div>
    <div class="p-6 space-y-4">
      <!-- Forms, tables, or any rich content -->
    </div>
    <div class="px-6 py-4 border-t border-gray-100 flex justify-end gap-3">
      <button @click="open = false" class="px-4 py-2 rounded-lg border border-gray-200 text-sm font-medium text-gray-700 hover:bg-gray-50">Cancel</button>
      <button @click="open = false" class="px-4 py-2 rounded-lg bg-alpine-500 hover:bg-alpine-600 text-white text-sm font-medium">Save Changes</button>
    </div>
  </div>
</div>

Basic Modal

This is a basic modal dialog. It uses a full-screen overlay and a centered white card. Click the X button or the dark overlay outside to close it.

Small Modal

A compact modal using max-w-sm for tighter dialogs like confirmations or quick alerts.

Large Modal

A large modal using max-w-2xl provides ample space for forms, data tables, or detailed content. This modal demonstrates a header, scrollable body, and footer with actions.

Modal Body Content

You can place forms, tables, images, or any other content here. The modal body will scroll if the content exceeds the viewport height.

Item 1

Detail description

Item 2

Detail description

Additional info in footer