Message
A chat message with avatar, author, timestamp and actions.
Import
import { Message } from "@tarve/core";Usage
import { Button, Message, Text } from "@tarve/core";
<Message
side="incoming"
author="Assistant"
avatarFallback="AI"
timestamp="10:42"
actions={<Button variant="ghost" size="sm">Copy</Button>}
>
<Text>Your build finished in 2.4s.</Text>
</Message>Props
| Prop | Type | Default |
|---|---|---|
actions | Child | — |
author | string | — |
avatarFallback | string | — |
avatarSrc | string | — |
bubbleVariant | BubbleVariant | "default" |
side | BubbleSide | "incoming" |
timestamp | string | — |
Common props
Shared by every component. See descriptions →
childrenhighlightidkeymotionFromonHighlightonPasteonTransitionEndrovingGroupstyleTypes
type BubbleSide = "incoming" | "outgoing";type BubbleVariant = "default" | "secondary" | "destructive";