Configurator
<div style="display:flex;flex-direction:column"><oc-chat-bubble-v1 variant="received" sender="OTTO Service" timestamp="2026-01-15T12:34">Deine Bestellung ist unterwegs und voraussichtlich morgen bei dir.</oc-chat-bubble-v1></div>Usage
Anatomy
HTML
<div class="on-frame" style="display:flex;justify-content:center;padding:40px 16px"><div style="width:300px;display:flex;flex-direction:column"><oc-chat-bubble-v1 variant="received" sender="OTTO Service" timestamp="2026-01-01T12:34">Hallo! Ich bin dein OTTO Service. Wie kann ich dir bei deiner Bestellung helfen?</oc-chat-bubble-v1></div></div>Variants
The chat bubble has the following two variants to define the message’s alignment and visual role within the conversation flow.
- Sent: Messages are right‑aligned to reflect the user’s own output.
- Received: Messages appear left‑aligned to represent incoming communication.
received
sent
HTML
<oc-chat-bubble-v1 variant="received">Hallo! Wie kann ich dir helfen?</oc-chat-bubble-v1>
<oc-chat-bubble-v1 variant="sent">Wo ist meine Bestellung?</oc-chat-bubble-v1>
Overline
In addition to alignment, the component supports flexible control of the overline:
It can be fully shown/hidden or configured to show only the sender name, the time or the combination of date and time. This allows to adjust the level of contextual information for the chat while keeping the conversation clean and readable. Messages sent within the last week show the day of the week (e.g. monday). From the sixth day onwards, the display switches from the day of the week to the full calendar date.
hidden overline
overline with sender
overline with time
overline with datetime (weekday within the last week)
overline with sender & time
overline with sender & datetime
HTML
<div class="on-frame" style="display:grid;grid-template-columns:minmax(0,300px) 1fr;gap:24px 40px;align-items:center;padding:24px 16px">
<oc-chat-bubble-v1 variant="received">Deine Bestellung ist unterwegs.</oc-chat-bubble-v1><p class="demo-label">hidden overline</p>
<oc-chat-bubble-v1 variant="received" sender="OTTO Service">Deine Bestellung ist unterwegs.</oc-chat-bubble-v1><p class="demo-label">overline with sender</p>
<oc-chat-bubble-v1 variant="received" timestamp="2026-01-01T12:34" hide-date>Deine Bestellung ist unterwegs.</oc-chat-bubble-v1><p class="demo-label">overline with time</p>
<oc-chat-bubble-v1 variant="received" timestamp="2026-01-01T12:34">Deine Bestellung ist unterwegs.</oc-chat-bubble-v1><p class="demo-label">overline with datetime (weekday within the last week)</p>
<oc-chat-bubble-v1 variant="received" sender="OTTO Service" timestamp="2026-01-01T12:34" hide-date>Deine Bestellung ist unterwegs.</oc-chat-bubble-v1><p class="demo-label">overline with sender & time</p>
<oc-chat-bubble-v1 variant="received" sender="OTTO Service" timestamp="2026-01-01T12:34">Deine Bestellung ist unterwegs.</oc-chat-bubble-v1><p class="demo-label">overline with sender & datetime</p>
Behaviour
Fitting
The width of the chat bubble uses fit-content.
HTML
<oc-chat-bubble-v1 variant="received" sender="OTTO Service">Deine Bestellung wurde heute an Hermes übergeben und ist voraussichtlich morgen bei dir.</oc-chat-bubble-v1>
<oc-chat-bubble-v1 variant="received">Super, danke!</oc-chat-bubble-v1>
The chat bubble spans up to 80% of the chat container to the left or right side depending on the variant. When the content reaches the width threshold, the text automatically wraps onto the next line without hyphenation.
HTML
<div class="on-frame" style="display:flex;justify-content:center;padding:24px 16px"><div style="width:100%;max-width:360px;border:1px solid #d6d6d6;border-radius:16px;overflow:hidden;background:#f0f0f0">
<div style="background:#fff;padding:12px 8px"><oc-icon-button-v3 icon="arrow-left" variant="transparent" oc-aria-label="Zurück"></oc-icon-button-v3></div>
<div style="display:flex;flex-direction:column;gap:12px;padding:16px">
<p class="demo-label" style="text-align:center">chat viewport · bubbles up to 80 %</p>
<oc-chat-bubble-v1 variant="received" sender="OTTO Service" timestamp="2026-09-25T09:33" hide-date>Hallo! Deine Bestellung wurde heute an Hermes übergeben und ist voraussichtlich morgen bei dir.</oc-chat-bubble-v1>
<oc-chat-bubble-v1 variant="sent" timestamp="2026-09-25T09:34" hide-date>Super, danke! Kann ich die Lieferung auch an eine Packstation umleiten?</oc-chat-bubble-v1>
<oc-chat-bubble-v1 variant="received" sender="OTTO Service" timestamp="2026-09-25T09:35" hide-date>Na klar, das geht.</oc-chat-bubble-v1>
</div>Best practices
Accessibility
Implementation
Live demo
HTML
<div class="on-frame" style="padding:32px 16px">
<div style="width:100%;max-width:390px;margin:0 auto;background:#fff;border-radius:16px;overflow:hidden;box-shadow:0 1px 3px rgba(0,0,0,.08)">
<div style="display:flex;align-items:center;gap:8px;padding:8px"><oc-icon-button-v3 icon="arrow-left" variant="transparent" oc-aria-label="Zurück"></oc-icon-button-v3><div style="display:grid"><span class="oc-copy-100" style="font-weight:700">OTTO Kundenservice</span><span class="oc-copy-75" style="color:var(--oc-semantic-color-text-success)">Online, antwortet meist sofort</span></div></div>
<oc-divider-v1 in-flow></oc-divider-v1>
<div style="display:flex;flex-direction:column;gap:12px;padding:16px;background:var(--oc-semantic-color-background-frame,#f0f0f0)">
<oc-chat-bubble-v1 variant="received" sender="OTTO Service" timestamp="2026-09-25T09:32" hide-date>Hallo Lara! Wie kann ich dir helfen?</oc-chat-bubble-v1>
<oc-chat-bubble-v1 variant="sent" timestamp="2026-09-25T09:33" hide-date>Mein Sessel sollte heute kommen, ich sehe aber noch keine Sendungsnummer.</oc-chat-bubble-v1>
<oc-chat-bubble-v1 variant="received" sender="OTTO Service" timestamp="2026-09-25T09:34" hide-date>Ich hab nachgeschaut: Dein Sessel ist bei der Spedition und kommt morgen zwischen 10 und 14 Uhr. Die Spedition ruft dich vorher an.</oc-chat-bubble-v1>
<oc-chip-v3><button>Termin ändern</button></oc-chip-v3><oc-chip-v3><button>Danke, passt!</button></oc-chip-v3></div>
<div style="display:flex;align-items:center;gap:8px;padding:12px 16px"><div style="flex:1"><oc-text-field-v1 placeholder="Nachricht schreiben">Nachricht</oc-text-field-v1></div><oc-icon-button-v3 icon="paper-plane" variant="primary" oc-aria-label="Nachricht senden"></oc-icon-button-v3></div>