製品比較コンポーネント
3Dのようなデザイン要素、ダークテーマのサポート、商品の視覚化のためのプレースホルダー画像の統合、picsum.photosと randomuser.me を使用したユーザーアバターを備えたレスポンシブ商品比較コンポーネント。
HTMLコード
<div class="container mx-auto px-4 py-8">
<div class="dark:bg-gray-800 bg-white rounded-lg shadow-lg overflow-hidden">
<div class="flex flex-col md:flex-row">
<!-- Product 1 -->
<div class="flex-1 p-6 dark:border-gray-700 border-b md:border-b-0 md:border-r relative">
<div class="absolute inset-0 bg-gradient-to-br from-blue-500 to-purple-600 opacity-20"></div>
<div class="relative z-10">
<h3 class="text-xl font-semibold mb-4 dark:text-white text-gray-800">Product A</h3>
<img src="https://picsum.photos/seed/producta/400/300" alt="Product A" class="mx-auto mb-6 rounded-md shadow-md">
<ul class="text-sm dark:text-gray-300 text-gray-700 space-y-2">
<li>Feature 1</li>
<li>Feature 2</li>
<li>Feature 3</li>
</ul>
<div class="mt-6 text-center">
<button class="bg-blue-600 text-white px-6 py-2 rounded-full hover:bg-blue-700 transition duration-300">Learn More</button>
</div>
</div>
</div>
<!-- Product 2 -->
<div class="flex-1 p-6 relative">
<div class="absolute inset-0 bg-gradient-to-br from-green-500 to-teal-600 opacity-20"></div>
<div class="relative z-10">
<h3 class="text-xl font-semibold mb-4 dark:text-white text-gray-800">Product B</h3>
<img src="https://picsum.photos/seed/productb/400/300" alt="Product B" class="mx-auto mb-6 rounded-md shadow-md">
<ul class="text-sm dark:text-gray-300 text-gray-700 space-y-2">
<li>Feature A</li>
<li>Feature B</li>
<li>Feature C</li>
</ul>
<div class="mt-6 text-center">
<button class="bg-green-600 text-white px-6 py-2 rounded-full hover:bg-green-700 transition duration-300">Learn More</button>
</div>
</div>
</div>
</div>
<!-- Comparison Table (Optional addition for more detail) -->
<div class="p-6 dark:bg-gray-700 bg-gray-100">
<h4 class="text-lg font-semibold mb-4 dark:text-white text-gray-800">Detailed Comparison</h4>
<table class="min-w-full divide-y divide-gray-200 dark:divide-gray-600">
<thead>
<tr>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider">Feature</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider">Product A</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider">Product B</th>
</tr>
</thead>
<tbody class="dark:bg-gray-800 bg-white divide-y divide-gray-200 dark:divide-gray-600">
<tr>
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium dark:text-white text-gray-900">Feature 1/A</td>
<td class="px-6 py-4 whitespace-nowrap text-sm dark:text-gray-300 text-gray-700">Yes</td>
<td class="px-6 py-4 whitespace-nowrap text-sm dark:text-gray-300 text-gray-700">Maybe</td>
</tr>
<tr>
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium dark:text-white text-gray-900">Feature 2/B</td>
<td class="px-6 py-4 whitespace-nowrap text-sm dark:text-gray-300 text-gray-700">Some</td>
<td class="px-6 py-4 whitespace-nowrap text-sm dark:text-gray-300 text-gray-700">Yes</td>
</tr>
<tr>
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium dark:text-white text-gray-900">Feature 3/C</td>
<td class="px-6 py-4 whitespace-nowrap text-sm dark:text-gray-300 text-gray-700">No</td>
<td class="px-6 py-4 whitespace-nowrap text-sm dark:text-gray-300 text-gray-700">Yes</td>
</tr>
</tbody>
</table>
</div>
<!-- Avatars section -->
<div class="p-6 flex justify-around items-center dark:bg-gray-700 bg-gray-100">
<img src="https://randomuser.me/api/portraits/women/44.jpg" alt="User Avatar 1" class="w-12 h-12 rounded-full shadow-md">
<img src="https://randomuser.me/api/portraits/men/32.jpg" alt="User Avatar 2" class="w-12 h-12 rounded-full shadow-md">
<img src="https://randomuser.me/api/portraits/women/21.jpg" alt="User Avatar 3" class="w-12 h-12 rounded-full shadow-md">
</div>
</div>
</div>
関連コンポーネント
製品比較コンポーネント
ミニマリスト/フラットデザイン、アースカラーの配色、およびTailwind CSSを使用したダッシュボード用の適度な複雑さを備えた製品比較コンポーネント。このコンポーネントはレスポンシブで、ダークテーマをサポートしています。JavaScript はありません。
製品比較コンポーネント - レトロなコーポレートスタイル
単色の青の配色を使用したレトロ/ビンテージの企業の美学を備えたレスポンシブ製品比較コンポーネント。複数のインタラクティブ要素とダークモードのサポートを備えています。デザインには、80年代/90年代にインスパイアされた幾何学模様、昔ながらのタイポグラフィ、ピクセルのようなアクセントを備えたレトロなスタイルのカードが含まれています。プロフェッショナリズムを維持しながら、ノスタルジックなデザインで目立ちたいビジネスWebサイトに最適です。
製品比較コンポーネント
マテリアルデザインの原則に基づいて設計された複雑な製品比較コンポーネントで、鮮やかな配色とダークモードのサポートが特徴です。ソーシャルメディアネットワーキングインターフェースに最適です。