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

喜欢/反应按钮组件

一个玻璃拟态风格的点赞/反应按钮组件,具有响应效果和使用 Tailwind CSS 支持暗模式。

预览

HTML 代码

<div class="flex justify-center items-center space-x-4 p-6 bg-white bg-opacity-10 backdrop-blur-lg rounded-lg shadow-lg dark:bg-gray-800 dark:bg-opacity-30">
    <div class="flex items-center space-x-2">
        <img class="w-8 h-8 rounded-full" src="https://randomuser.me/api/portraits/men/1.jpg" alt="User Avatar">
        <span class="text-lg text-gray-900 dark:text-white">Like</span>
    </div>
    <button class="flex items-center p-2 text-white bg-blue-500 rounded-full transition duration-300 ease-in-out hover:bg-blue-600 focus:outline-none">
        <span class="material-icons"> thumb_up </span>
    </button>
    <button class="flex items-center p-2 text-white bg-red-500 rounded-full transition duration-300 ease-in-out hover:bg-red-600 focus:outline-none">
        <span class="material-icons"> favorite </span>
    </button>
    <button class="flex items-center p-2 text-white bg-yellow-500 rounded-full transition duration-300 ease-in-out hover:bg-yellow-600 focus:outline-none">
        <span class="material-icons"> sentiment_satisfied </span>
    </button>
</div>

<style>
    /* Add Material Icons font link */
    @import url('https://fonts.googleapis.com/icon?family=Material+Icons');
</style>

相关组件

喜欢/反应按钮组件

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

打开

喜欢/反应按钮

一个具有微交互、响应性和深色主题支持的点赞/反应按钮组件。

打开

NeumorphismLikeReactionButtons

响应式点赞/反应按钮组件,适用于支持深色主题和 Neumorphism 设计的博客/内容。

打开