Message
shadcn/uiTurn container supporting message branching, copy controls, actions, and role alignment.
Message
Installation
Props
<AIMessage />
Name | Type | |
|---|---|---|
align | "end" | "start" |
<AIMessageContent />
Name | Type | |
|---|---|---|
header | React.ReactNode | |
bubbleVariant | "outline" | "default" | "secondary"(default: muted) |
<AIMessageAction />
Name | Type | |
|---|---|---|
tooltip | string | |
label | string | |
variant | "link" | "outline" | "default"(default: ghost) | |
render | React.ReactElement | |
nativeButton | boolean | |
focusableWhenDisabled | boolean | |
animation | "none" | "all" | "colors" | "only-scale" |
<AIMessageBranch />
Name | Type | |
|---|---|---|
defaultBranch | number(default: 0) | |
branch | number | |
onBranchChange | ((branchIndex: number) => void) |
<AIMessageBranchPrevious />
Name | Type | |
|---|---|---|
variant | "link" | "outline" | "default"(default: ghost) | |
render | React.ReactElement | |
nativeButton | boolean | |
focusableWhenDisabled | boolean | |
animation | "none" | "all" | "colors" | "only-scale" |
<AIMessageBranchNext />
Name | Type | |
|---|---|---|
variant | "link" | "outline" | "default"(default: ghost) | |
render | React.ReactElement | |
nativeButton | boolean | |
focusableWhenDisabled | boolean | |
animation | "none" | "all" | "colors" | "only-scale" |
<AIMessageCopyButton />
Name | Type | |
|---|---|---|
timeout | number(default: 2000) | |
onCopy | (() => void) | |
onError | ((error: Error) => void) | |
tooltip | string | |
label | string | |
render | React.ReactElement | |
nativeButton | boolean | |
animation | "none" | "all" | "colors" | "only-scale" | |
variant | "link" | "outline" | "default" | |
focusableWhenDisabled | boolean |