Skip to content

Some properties provide flexibility for specific integrations. Follow the component's usage guidance. Customizations beyond the documented patterns need a use case approved by DNB UX. Read about intended use and customization.

Experimental: The Chat extension and its component APIs may change in the future. Please give us feedback on your experience with them.

Properties#

TypeDescription
from"user"
"assistant"
(optional) Conversation side: user is the current user on the right; assistant is the other participant on the left, human or AI. Defaults to assistant.
idstring(optional) Unique DOM id used by the conversation scrolling and visibility hooks.
variant"bubble"
"plain"
(optional) Show the content in a bubble, or as plain content without background.
nameReact.ReactNode(optional) Name shown in the header, e.g. You or the name of the other participant.
timestampReact.ReactNode(optional) Time shown in the header after the name, e.g. 15:23.
avatarReact.ReactNode(optional) Decorative avatar shown beside the bubble, e.g. an Avatar with hasLabel. Provide the sender name in the message or its accessible label; the avatar is hidden from screen readers.
groupedboolean(optional) Continues the previous sender group. Retains avatar alignment while hiding the repeated avatar.
aiGeneratedboolean(optional) Show a tag telling that the content is generated by AI.
actionsReact.ReactNode(optional) Content shown below the message, e.g. Chat.Actions.
childrenReact.ReactNode(optional) The content of the message.
Spacestring
object
(optional) Spacing properties like top or bottom are supported.

Translations#

Keynb-NOen-GBsv-SEda-DK
aiGeneratedKI-generertAI-generatedAI-genereratAI-genereret
Suggest an edit