Message
import { Bubble, MessageGroup, MessageParts, TimeSeparator, bubblePosition } from "@arcadia/ui";Bubble
side- "start" | "end"
- Default:
"start" position- "single" | "first" | "middle" | "last"
- Default:
"single" - Compute it with
bubblePosition(index, count). variant- "solid" | "outline" | "flat"
- Default:
"solid" enter- BubbleEnter | null
- Plays once on mount. Omit for bubbles that were already there (a reload, a scroll back).
flush- boolean
- No padding, its content clipped to the bubble's corners: a file card, a list of rows, media.
selected- boolean
- Its context menu is open: the fill steps up.
flash- boolean
- A jump just landed on it (a find hit, a link, a reply's source): a ring comes up, holds and fades. Set it for the run of
--duration-flash, then clear it. rootStyle- BubbleStyle
- Typed StyleX override: layout and the
--bubble-*knobs.
Rest props go to <div> props and render.
side- "start" | "end"
- Default:
"start" author- ReactNode
- Who speaks, on one line above the first bubble: for a party who isn't the conversation's own (another agent). A 16px avatar and a name; it sits on the bubble's text edge, so every bubble of the conversation keeps one edge.
authorPicture- ReactNode
meta- ReactNode
- A quiet caption under the run, on its side: a receipt, a time.
avatar- ReactNode
- The sender's picture, for a conversation of several parties: it hangs outside the run,
--space-2from its edge, so every bubble keeps the composer's text edge, and holds at the top of the view while the run scrolls, never past the run's own top or end. The conversation keeps room for it in its inline padding:--space-6for a 16px picture. Pass the product'sAvataras it is;aria-hiddenwhere the author line or the group's name says who it is. rootStyle- MessageGroupStyle
- Typed StyleX override: layout and the
--message-*knobs.
Rest props go to <div> props.
side- "start" | "end"
- Default:
"start" - For every part.
position- "single" | "first" | "middle" | "last"
- Default:
"single" - Its place in its run, as a bubble's.
enter- BubbleEnter | null
- One entrance for every part, on mount.
label- string
- Its name, and with it a group for assistive technology. Without one it is a plain wrapper: the message around it (the product's own article, "From @hana") already says whose it is.
flash- boolean
- Default:
false - A jump just landed on it (a reply's source): each of its parts, a picture as a bubble, takes the held ring, so a message of pictures alone is held as one of words is. Set it for the run of
--duration-flash, then clear it. rootStyle- RootStyle<Pick<BubbleKnobs, "--bubble-enter-delay">>
- Typed StyleX override: layout and
--bubble-enter-delay.
Rest props go to <div> props.
day- ReactNode
- The day ("Today", "Yesterday", "Monday", "Oct 3").
time- ReactNode
- The time of day ("12:04 AM").
dateTime- string
- Machine-readable moment for the
<time>element (an ISO string). rootStyle- RootStyle
- Typed StyleX override: layout.
Rest props go to <div> props.