交互式组件

一个 Web 组件,设计为具有拟物化元素,适用于社交媒体界面,具有互补的配色方案和深色主题支持。

预览

HTML 代码

<div class="bg-gray-800 dark:bg-gray-900 p-6 rounded-lg shadow-lg flex flex-col lg:flex-row">
    <div class="flex-shrink-0 mb-4 lg:mb-0 lg:mr-4">
        <img class="w-16 h-16 rounded-full" src="https://randomuser.me/api/portraits/men/1.jpg" alt="User Avatar">
    </div>
    <div class="flex-1">
        <h2 class="text-white dark:text-gray-200 text-xl font-bold">John Doe</h2>
        <p class="text-gray-400 dark:text-gray-500 text-sm mb-2">@john_doe</p>
        <p class="text-gray-300 dark:text-gray-400 mb-4">Here’s a glimpse of my recent adventures! 🗺️</p>
        <img class="w-full h-64 object-cover rounded-lg mb-4" src="https://picsum.photos/800/400?random=1" alt="Adventure Image">
        <div class="flex justify-between">
            <button class="bg-blue-500 dark:bg-blue-600 text-white font-semibold py-2 px-4 rounded hover:bg-blue-600 dark:hover:bg-blue-700 transition duration-300">Like</button>
            <button class="bg-green-500 dark:bg-green-600 text-white font-semibold py-2 px-4 rounded hover:bg-green-600 dark:hover:bg-green-700 transition duration-300">Comment</button>
            <button class="bg-red-500 dark:bg-red-600 text-white font-semibold py-2 px-4 rounded hover:bg-red-600 dark:hover:bg-red-700 transition duration-300">Share</button>
        </div>
    </div>
</div>

相关组件

交互式组件

具有拟物化设计的互动组件,采用类似颜色方案,适用于博客/内容目的的中等复杂性。响应式设计支持深色主题。无JavaScript代码。

打开

交互式组件组件

一个社交媒体互动组件,具有柔和的配色方案、适度的复杂度、响应式设计和深色模式支持,使用 Tailwind CSS 构建并遵循 Material Design 原则。它使用来自 picsum.photos 的虚拟图像和 randomuser.me 中的头像。

打开

拟物交互组件

适用于商业/企业网站的拟态交互组件。

打开