组件 聊天窗口 聊天窗口组件

聊天窗口组件

一个简单的聊天窗口组件,采用材料设计风格,具有深色主题和适合社交媒体界面的响应式布局。

预览

HTML 代码

<div class="h-screen bg-gray-100 dark:bg-gray-800 flex flex-col justify-end">
    <div class="max-w-md w-full bg-white dark:bg-gray-900 rounded-lg shadow-lg p-4">
        <div class="flex flex-col space-y-4 overflow-y-scroll h-80">
            <div class="flex items-start space-x-2">
                <img src="https://randomuser.me/api/portraits/men/32.jpg" alt="User Avatar" class="w-8 h-8 rounded-full">
                <div class="bg-blue-500 text-white p-2 rounded-lg rounded-bl-none">
                    Hello, how are you?
                </div>
            </div>
            <div class="flex items-start space-x-2">
                <img src="https://randomuser.me/api/portraits/women/32.jpg" alt="User Avatar" class="w-8 h-8 rounded-full">
                <div class="bg-gray-300 text-gray-800 p-2 rounded-lg rounded-br-none">
                    I'm good, thanks! How about you?
                </div>
            </div>
            <div class="flex items-start space-x-2">
                <img src="https://randomuser.me/api/portraits/men/33.jpg" alt="User Avatar" class="w-8 h-8 rounded-full">
                <div class="bg-blue-500 text-white p-2 rounded-lg rounded-bl-none">
                    I'm doing well! Ready for the weekend?
                </div>
            </div>
        </div>
        <div class="mt-4 flex">
            <input type="text" placeholder="Type your message..." class="flex-1 bg-gray-200 dark:bg-gray-700 text-gray-900 dark:text-white rounded-lg p-2 focus:outline-none focus:ring focus:ring-blue-500">
            <button class="bg-blue-500 text-white p-2 rounded-lg ml-2 focus:outline-none">Send</button>
        </div>
    </div>
</div>

相关组件

聊天窗口组件

一个简单且响应迅速的聊天窗口组件,具有赛博朋克风格的美学和自然的大地色调,专为论坛和社区平台而设计。包括深色模式支持。

打开

聊天窗口组件

一个简单、响应迅速、受 Material Design 启发的聊天窗口组件,具有温暖的日落色调,适用于商业和企业网站,支持深色模式。

打开

聊天窗口组件

一个简单、响应式的聊天窗口组件,具有有机/自然风格的设计、霓虹灯/电色调和深色模式支持,适用于预订/预订系统。

打开