채팅 버블
채팅 버블 (Chat bubble)
Chat bubble은 한 줄의 대화와 작성자 이미지·이름·시간 등 모든 데이터를 보여주는 데 사용해요.
출처: 문서
본문
Chat bubble은 한 줄의 대화와 그 데이터(작성자 이미지, 작성자 이름, 시간 등)를 표시하는 데 사용해요.
| 클래스명 | 타입 | 설명 |
|---|---|---|
| chat | 컴포넌트 | 대화 한 줄과 그 데이터를 담는 컨테이너 |
| chat-image | 파트 | 작성자 이미지 |
| chat-header | 파트 | 채팅 버블 위쪽 텍스트 |
| chat-footer | 파트 | 채팅 버블 아래쪽 텍스트 |
| chat-bubble | 파트 | 채팅 버블 |
| chat-start | 배치 | 채팅을 가로로 시작 지점에 정렬 (필수) |
| chat-end | 배치 | 채팅을 가로로 끝 지점에 정렬 (필수) |
| chat-bubble-neutral | 색상 | chat-bubble의 neutral 색상 |
| chat-bubble-primary | 색상 | chat-bubble의 primary 색상 |
| chat-bubble-secondary | 색상 | chat-bubble의 secondary 색상 |
| chat-bubble-accent | 색상 | chat-bubble의 accent 색상 |
| chat-bubble-info | 색상 | chat-bubble의 info 색상 |
| chat-bubble-success | 색상 | chat-bubble의 success 색상 |
| chat-bubble-warning | 색상 | chat-bubble의 warning 색상 |
| chat-bubble-error | 색상 | chat-bubble의 error 색상 |
chat-start와 chat-end
<div class="$$chat $$chat-start">
<div class="$$chat-bubble">
It's over Anakin,
<br />
I have the high ground.
</div>
</div>
<div class="$$chat $$chat-end">
<div class="$$chat-bubble">You underestimate my power!</div>
</div>
이미지가 있는 Chat
<div class="$$chat $$chat-start">
<div class="$$chat-image $$avatar">
<div class="w-10 rounded-full">
<img
alt="Tailwind CSS chat bubble component"
src="https://img.daisyui.com/images/profile/demo/[email protected]"
/>
</div>
</div>
<div class="$$chat-bubble">It was said that you would, destroy the Sith, not join them.</div>
</div>
<div class="$$chat $$chat-start">
<div class="$$chat-image $$avatar">
<div class="w-10 rounded-full">
<img
alt="Tailwind CSS chat bubble component"
src="https://img.daisyui.com/images/profile/demo/[email protected]"
/>
</div>
</div>
<div class="$$chat-bubble">It was you who would bring balance to the Force</div>
</div>
<div class="$$chat $$chat-start">
<div class="$$chat-image $$avatar">
<div class="w-10 rounded-full">
<img
alt="Tailwind CSS chat bubble component"
src="https://img.daisyui.com/images/profile/demo/[email protected]"
/>
</div>
</div>
<div class="$$chat-bubble">Not leave it in Darkness</div>
</div>
이미지·헤더·푸터가 있는 Chat
<div class="$$chat $$chat-start">
<div class="$$chat-image $$avatar">
<div class="w-10 rounded-full">
<img
alt="Tailwind CSS chat bubble component"
src="https://img.daisyui.com/images/profile/demo/[email protected]"
/>
</div>
</div>
<div class="$$chat-header">
Obi-Wan Kenobi
<time class="text-xs opacity-50">12:45</time>
</div>
<div class="$$chat-bubble">You were the Chosen One!</div>
<div class="$$chat-footer opacity-50">Delivered</div>
</div>
<div class="$$chat $$chat-end">
<div class="$$chat-image $$avatar">
<div class="w-10 rounded-full">
<img
alt="Tailwind CSS chat bubble component"
src="https://img.daisyui.com/images/profile/demo/[email protected]"
/>
</div>
</div>
<div class="$$chat-header">
Anakin
<time class="text-xs opacity-50">12:46</time>
</div>
<div class="$$chat-bubble">I hate you!</div>
<div class="$$chat-footer opacity-50">Seen at 12:46</div>
</div>
헤더와 푸터가 있는 Chat
<div class="$$chat $$chat-start">
<div class="$$chat-header">
Obi-Wan Kenobi
<time class="text-xs opacity-50">2 hours ago</time>
</div>
<div class="$$chat-bubble">You were the Chosen One!</div>
<div class="$$chat-footer opacity-50">Seen</div>
</div>
<div class="$$chat $$chat-start">
<div class="$$chat-header">
Obi-Wan Kenobi
<time class="text-xs opacity-50">2 hour ago</time>
</div>
<div class="$$chat-bubble">I loved you.</div>
<div class="$$chat-footer opacity-50">Delivered</div>
</div>
색상이 있는 Chat Bubble
<div class="$$chat $$chat-start">
<div class="$$chat-bubble $$chat-bubble-primary">What kind of nonsense is this</div>
</div>
<div class="$$chat $$chat-start">
<div class="$$chat-bubble $$chat-bubble-secondary">
Put me on the Council and not make me a Master!??
</div>
</div>
<div class="$$chat $$chat-start">
<div class="$$chat-bubble $$chat-bubble-accent">
That's never been done in the history of the Jedi.
</div>
</div>
<div class="$$chat $$chat-start">
<div class="$$chat-bubble $$chat-bubble-neutral">It's insulting!</div>
</div>
<div class="$$chat $$chat-end">
<div class="$$chat-bubble $$chat-bubble-info">Calm down, Anakin.</div>
</div>
<div class="$$chat $$chat-end">
<div class="$$chat-bubble $$chat-bubble-success">You have been given a great honor.</div>
</div>
<div class="$$chat $$chat-end">
<div class="$$chat-bubble $$chat-bubble-warning">To be on the Council at your age.</div>
</div>
<div class="$$chat $$chat-end">
<div class="$$chat-bubble $$chat-bubble-error">It's never happened before.</div>
</div>
더 알아보기 (Learn more)
daisyUI의 Chat bubble 컴포넌트와 chat-start/chat-end 배치, 이미지·헤더·푸터 구성, 그리고 chat-bubble-* 색상 클래스 활용법에 대해 더 알아보세요.