구성 요소 채팅 창 Chat Window 구성 요소

Chat Window 구성 요소

마이크로 상호 작용, 반응형 디자인 및 어두운 테마 지원을 제공하는 간단한 채팅 창 구성 요소로, 블로그 또는 콘텐츠 소비에 적합합니다.

미리 보기

HTML 코드

<div class="flex flex-col h-screen antialiased text-gray-800 bg-gray-50 dark:bg-gray-900 dark:text-gray-200">
  <div class="flex flex-row items-center justify-between flex-shrink-0 px-4 py-2 border-b border-gray-200 dark:border-gray-700">
    <div class="flex items-center gap-3">
      <img src="https://randomuser.me/api/portraits/thumb/men/75.jpg" alt="User Avatar" class="w-10 h-10 rounded-full">
      <div class="flex flex-col">
        <div class="font-semibold">John Doe</div>
        <div class="text-sm text-gray-500 dark:text-gray-400">Active now</div>
      </div>
    </div>
    <button class="text-gray-500 hover:text-gray-700 dark:hover:text-gray-300">
      <svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
        <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" />
      </svg>
    </button>
  </div>

  <div class="flex-1 p-4 overflow-y-auto">
    <!-- Incoming Message -->
    <div class="flex items-end mb-4">
      <img src="https://randomuser.me/api/portraits/thumb/women/75.jpg" alt="User Avatar" class="w-8 h-8 mr-3 rounded-full">
      <div class="flex flex-col space-y-2 text-xs max-w-xs mx-2 order-2 items-start">
        <div>
          <span class="inline-block px-4 py-2 text-gray-700 bg-gray-200 rounded-lg dark:bg-gray-700 dark:text-gray-200">
            Hey there! How are you doing?
          </span>
        </div>
      </div>
    </div>

    <!-- Outgoing Message -->
    <div class="flex items-end justify-end mb-4">
      <div class="flex flex-col space-y-2 text-xs max-w-xs mx-2 order-1 items-end">
        <div>
          <span class="inline-block px-4 py-2 text-white bg-blue-500 rounded-lg">
            I'm doing great, thanks for asking! How about you?
          </span>
        </div>
      </div>
      <img src="https://randomuser.me/api/portraits/thumb/men/75.jpg" alt="User Avatar" class="w-8 h-8 ml-3 rounded-full">
    </div>

    <!-- Another Incoming Message -->
    <div class="flex items-end mb-4">
      <img src="https://randomuser.me/api/portraits/thumb/women/75.jpg" alt="User Avatar" class="w-8 h-8 mr-3 rounded-full">
      <div class="flex flex-col space-y-2 text-xs max-w-xs mx-2 order-2 items-start">
        <div>
          <span class="inline-block px-4 py-2 text-gray-700 bg-gray-200 rounded-lg dark:bg-gray-700 dark:text-gray-200">
            I'm doing good too! Just chilling and working on some projects.
          </span>
        </div>
      </div>
    </div>
  </div>

  <div class="flex-shrink-0 px-4 py-2 border-t border-gray-200 dark:border-gray-700">
    <div class="relative flex items-center">
      <input type="text" placeholder="Type your message..." class="flex-grow w-full h-10 px-4 pr-10 text-gray-700 placeholder-gray-400 bg-gray-100 border border-gray-300 rounded-full focus:outline-none focus:ring-2 focus:ring-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:text-gray-200 dark:placeholder-gray-400">
      <button class="absolute inset-y-0 right-0 flex items-center pr-3 text-gray-500 hover:text-blue-500 focus:outline-none">
        <svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6 transform rotate-90" fill="none" viewBox="0 0 24 24" stroke="currentColor">
          <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 19l9 2-9-18-9 18 9-2zm0 0v-8" />
        </svg>
      </button>
    </div>
  </div>
</div>

관련 구성 요소

Chat Window 구성 요소

중간 정도의 복잡성과 대화형 기능이 있는 대시보드를 위한 3차원 회색조 채팅 창 구성 요소입니다. 어두운 테마를 지원하는 반응형 디자인.

열다

Chat Window 구성 요소

머티리얼 디자인(Material Design) 원칙에 따라 설계된 반응형 채팅 창 구성 요소로, 비영리/자선 단체에 적합한 가을 색 구성표를 특징으로 합니다. 다크 모드 지원과 메시지 버블 및 입력 필드와 같은 대화형 요소가 포함됩니다.

열다

Chat Window 구성 요소

유기적/자연에서 영감을 받은 디자인, 네온/일렉트릭 색상 구성표 및 다크 모드 지원을 갖춘 간단하고 반응이 빠른 채팅 창 구성 요소로 예약/예약 시스템에 적합합니다.

열다