アラート メッセージ コンポーネント
ブログ用に設計されたミニマリストのアラートメッセージコンポーネントで、グレースケールの配色が特徴です。タイトル、メッセージ、閉じるボタンが含まれています。ダークテーマをサポートするレスポンシブデザイン。
HTMLコード
<div class="flex flex-col items-center justify-center p-4 bg-white dark:bg-gray-900 rounded-md shadow-lg max-w-md mx-auto mt-6">
<div class="flex justify-between items-center w-full">
<h2 class="text-lg font-semibold text-gray-800 dark:text-gray-200">Alert Title</h2>
<button class="text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300 focus:outline-none">
×
</button>
</div>
<p class="mt-2 text-gray-600 dark:text-gray-400">
This is a minimal alert message for your blog or content. It is meant to grab the reader's attention without being intrusive.
</p>
<div class="flex items-center mt-3">
<img src="https://randomuser.me/api/portraits/men/1.jpg" alt="User" class="w-8 h-8 rounded-full mr-2">
<span class="text-gray-700 dark:text-gray-300 text-sm">Posted by John Doe</span>
</div>
<div class="flex justify-end mt-4">
<button class="px-4 py-2 bg-gray-800 text-white rounded-md hover:bg-gray-700 dark:bg-gray-600 dark:hover:bg-gray-500">
Action
</button>
</div>
</div>
関連コンポーネント
アラート メッセージ コンポーネント
ポートフォリオ用のマテリアルデザインスタイル、パステルカラースキーム、および複雑な複雑さのレベルを備えたアラートメッセージコンポーネント。ダークテーマをサポートするレスポンシブデザイン。JavaScriptコードは必要なく、Tailwindクラスを含むHTMLのみが必要です。ダークモードでは、スタイリングにTailwindのdark:プレフィックスを使用します。画像にはpicsum.photosを使用し、アバターには randomuser.me を使用します。