组件 点赞/反应按钮 喜欢/反应按钮组件

喜欢/反应按钮组件

一个响应式点赞/反应按钮组件,考虑到微交互,采用单色配色方案,适合博客和内容消费,并支持深色主题。

预览

HTML 代码

<div class="flex flex-col items-center p-4 space-y-4 bg-gray-200 dark:bg-gray-800 rounded-md shadow-md">
    <h2 class="text-lg font-semibold text-gray-800 dark:text-gray-200">Engage with this post!</h2>
    <div class="flex space-x-4">
        <button class="relative group p-2 rounded-full text-blue-600 dark:text-blue-300 hover:bg-blue-100 dark:hover:bg-blue-600 transition duration-300 ease-in-out">
            <img src="https://picsum.photos/35/35" alt="Like" class="rounded-full">
            <span class="absolute bottom-full left-1/2 transform -translate-x-1/2 -translate-y-2 opacity-0 group-hover:opacity-100 transition-opacity duration-300">Like</span>
        </button>
        <button class="relative group p-2 rounded-full text-green-600 dark:text-green-300 hover:bg-green-100 dark:hover:bg-green-600 transition duration-300 ease-in-out">
            <img src="https://picsum.photos/35/35" alt="Love" class="rounded-full">
            <span class="absolute bottom-full left-1/2 transform -translate-x-1/2 -translate-y-2 opacity-0 group-hover:opacity-100 transition-opacity duration-300">Love</span>
        </button>
        <button class="relative group p-2 rounded-full text-red-600 dark:text-red-300 hover:bg-red-100 dark:hover:bg-red-600 transition duration-300 ease-in-out">
            <img src="https://picsum.photos/35/35" alt="Angry" class="rounded-full">
            <span class="absolute bottom-full left-1/2 transform -translate-x-1/2 -translate-y-2 opacity-0 group-hover:opacity-100 transition-opacity duration-300">Angry</span>
        </button>
    </div>
    <p class="text-sm text-gray-600 dark:text-gray-400">Your reactions help us improve!</p>
</div>

相关组件

喜欢/反应按钮组件

一个具有Glassmorphism设计风格的点赞/反应按钮组件,具有磨砂玻璃效果、响应式设计和深色主题支持,使用Tailwind CSS。

打开

点赞/反应按钮组件

一个以极简主义风格设计的点赞/反应按钮组件,使用Tailwind CSS,具有响应式效果和深色主题支持。

打开

点赞/反应按钮组件

一个具有点赞和反应按钮的网络组件,采用仿生设计风格,具备响应式效果和使用Tailwind CSS的黑暗主题支持。

打开