HextaUI

Bubble: Tail

shape="tail" draws a tail on the last bubble of a run, matching the bubble color. Outline and ghost bubbles skip it.

Pushed the fix, can you take a look?
Looks good. Merging after CI passes.
Jamie joined the conversation
Pinned: release notes are in the doc.
Outline bubbles never get a tail.
Message failed to send. Tap to retry.
Reactions sit on the top corner.
ok
Only the last bubble in a group
gets the tail.
import {
  Bubble,
  BubbleContent,
  BubbleGroup,
  BubbleReactions,
} from "@/components/ui/bubble"

export function BubbleTail() {
  return (
    <div className="flex w-full max-w-md flex-col gap-3">
      <Bubble shape="tail">
        <BubbleContent>Pushed the fix, can you take a look?</BubbleContent>
      </Bubble>
      <Bubble shape="tail" variant="secondary" align="end">
        <BubbleContent>Looks good. Merging after CI passes.</BubbleContent>
      </Bubble>
      <Bubble shape="tail" variant="muted">
        <BubbleContent>Jamie joined the conversation</BubbleContent>
      </Bubble>
      <Bubble shape="tail" variant="tinted" align="end">
        <BubbleContent>Pinned: release notes are in the doc.</BubbleContent>
      </Bubble>
      <Bubble shape="tail" variant="outline">
        <BubbleContent>Outline bubbles never get a tail.</BubbleContent>
      </Bubble>
      <Bubble shape="tail" variant="destructive" align="end">
        <BubbleContent>Message failed to send. Tap to retry.</BubbleContent>
      </Bubble>
      <Bubble shape="tail" align="end">
        <BubbleContent>Reactions sit on the top corner.</BubbleContent>
        <BubbleReactions side="top" align="start" role="img" aria-label="Heart">
          <span>❤️</span>
        </BubbleReactions>
      </Bubble>
      <Bubble shape="tail" variant="secondary">
        <BubbleContent>ok</BubbleContent>
      </Bubble>
      <BubbleGroup shape="tail">
        <Bubble variant="secondary">
          <BubbleContent>Only the last bubble in a group</BubbleContent>
        </Bubble>
        <Bubble variant="secondary">
          <BubbleContent>gets the tail.</BubbleContent>
        </Bubble>
      </BubbleGroup>
    </div>
  )
}

This adds the example as components/examples/bubble/tail.tsx, together with the Bubble component and the HextaUI theme tokens it needs.

pnpm dlx shadcn@latest add https://hextaui.com/r/bubble-tail.json

To add only the component, follow the Bubble installation.

Props in this example

The Bubble props this example sets, from the API reference.

PropTypeDefault
variant
"default" | "secondary" | "muted" | "tinted" | "outline" | "ghost" | "destructive""default"
align
"start" | "end""start"
shapeInherited from BubbleGroup when not set.
"uniform" | "joined" | "tail""joined"
PropTypeDefault
shapeApplies to every bubble inside the group.
"uniform" | "joined" | "tail"–
PropTypeDefault
side
"top" | "bottom""bottom"
align
"start" | "end""end"

Every prop is in the Bubble API reference.

See them all, with keyboard support and accessibility notes, on the Bubble page.