Components

Bubble

Message content with optional reactions

Import
import { Bubble, BubbleContent } from "@nyte-ai/ui/bubble";

A container for message content and reactions.

Usage

  • Style with className and style, not xstyle.
  • With render, BubbleContent props and refs stay typed for a div.

Anatomy

PartElementParent
BubbleGroupdivOptional group
BubbledivBubbleGroup or your container
BubbleContentdiv, or renderBubble
BubbleReactionsdivBubble

Examples

<Bubble align="end">
  <BubbleContent>Inspect the latest change.</BubbleContent>
</Bubble>
<BubbleContent render={<button type="button" />}>Edit message</BubbleContent>

Props

Parts take native props and refs and set a matching data-slot.

PartPropTypeDefault
Bubblevariant"default" | "secondary" | "muted" | "tinted" | "outline" | "ghost" | "destructive" | null"default"
Bubblealign"start" | "end""start"
BubbleContentrenderReactElement | render callbackdiv
BubbleReactionsside"top" | "bottom""bottom"
BubbleReactionsalign"start" | "end""end"

Every prop except render sets a matching data-* attribute. A null variant omits its class and attribute.

Accessibility

Bubble parts add no role or focus styles. Give reaction controls accessible names.