HTMLコード
<div class="fixed inset-0 bg-gray-900 bg-opacity-50 overflow-y-auto h-full w-full dark:bg-gray-800 dark:bg-opacity-75">
<div class="relative top-20 mx-auto p-5 border w-96 shadow-lg rounded-md bg-stone-100 dark:bg-stone-700">
<div class="mt-3 text-center">
<div
class="mx-auto flex items-center justify-center h-12 w-12 rounded-full bg-emerald-100 dark:bg-emerald-700"
>
<svg
class="h-6 w-6 text-emerald-600 dark:text-emerald-200"
fill="none"
stroke="currentColor"
viewBox="0 0 24 24"
xmlns="http://www.w3.org/2000/svg"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M5 13l4 4L19 7"
></path>
</svg>
</div>
<h3
class="text-lg leading-6 font-medium text-gray-900 dark:text-gray-100"
>
Dashboard Item Details
</h3>
<div class="mt-2 px-7 py-3">
<p class="text-sm text-gray-500 dark:text-gray-300">
Detailed information about the selected dashboard item. This is a placeholder for dynamic content.
</p>
</div>
<div class="items-center px-4 py-3">
<button
id="ok-btn"
class="px-4 py-2 bg-emerald-500 text-white text-base font-medium rounded-md w-full shadow-sm hover:bg-emerald-700 focus:outline-none focus:ring-2 focus:ring-emerald-300 dark:focus:ring-emerald-800"
>
Close
</button>
</div>
</div>
</div>
</div>
関連コンポーネント
レトロなブログモーダル
レトロビンテージにインスパイアされたブログコンテンツ用のモーダルコンポーネントで、補色スキーム、インタラクティブ要素による適度な複雑さ、レスポンシブデザイン、ダークモードのサポートが特徴です。JavaScript は使用せず、HTML と Tailwind CSS クラスのみに依存しています。画像はpicsum.photosから、アバターは randomuser.me から提供されています。
マイクロインタラクションを持つ複雑な素朴なビジネスモーダル
複雑で応答性の高いアースカラーのモーダルコンポーネントで、マイクロインタラクションがあり、ビジネスWebサイトに適しており、ダークモードをサポートします。