DefaultArrowPositionFlatPrefixSuffixCodeblockTopOffsetColor
<nve-chat-message> Your deployment completed successfully. All services are running as expected. </nve-chat-message>
Your deployment completed successfully. All services are running as expected.
Edit Example
A chat message component displays a text message within a conversation, sent between users or bots
<section nve-layout="column gap:lg">
<nve-chat-message>Your deployment completed successfully. All services are running as expected.</nve-chat-message>
<nve-chat-message arrow-position="top-start"
>Your deployment completed successfully. All services are running as expected.</nve-chat-message
>
<nve-chat-message arrow-position="top-end"
>Your deployment completed successfully. All services are running as expected.</nve-chat-message
>
<nve-chat-message arrow-position="bottom-start"
>Your deployment completed successfully. All services are running as expected.</nve-chat-message
>
<nve-chat-message arrow-position="bottom-end"
>Your deployment completed successfully. All services are running as expected.</nve-chat-message
>
</section>
Your deployment completed successfully. All services are running as expected.
Your deployment completed successfully. All services are running as expected.
Your deployment completed successfully. All services are running as expected.
Your deployment completed successfully. All services are running as expected.
Your deployment completed successfully. All services are running as expected.
Edit Example
ArrowPosition Description top-start top-end bottom-start bottom-end
<section nve-layout="column gap:lg full">
<nve-chat-message container="flat">
<nve-avatar slot="prefix" color="green-grass">AI</nve-avatar>
Your deployment completed successfully. All services are running as expected.
</nve-chat-message>
<nve-chat-message container="flat" style="width: 300px">
<nve-avatar slot="prefix" color="green-grass">AI</nve-avatar>
The build pipeline finished processing all stages. Tests passed with 98% coverage, and the deployment to staging was
successful. Review the detailed logs in the CI dashboard for more information.
</nve-chat-message>
</section>
AI
Your deployment completed successfully. All services are running as expected.
AI
The build pipeline finished processing all stages. Tests passed with 98% coverage, and the deployment to staging was
successful. Review the detailed logs in the CI dashboard for more information.
Edit Example
Flat container style with avatar integration. Perfect for modern chat interfaces where messages have a cleaner, flatter appearance.
<section nve-layout="column gap:lg full" style="max-width: 600px">
<nve-chat-message style="max-width: 70%">
<nve-avatar slot="prefix" color="gray-denim">AI</nve-avatar>
Hello, how may I assist you today?
</nve-chat-message>
<nve-chat-message style="max-width: 70%; margin-left: auto">
How do I use the chat message component?
<nve-avatar slot="suffix" color="green-grass">NV</nve-avatar>
</nve-chat-message>
<nve-chat-message style="max-width: 70%">
<nve-avatar slot="prefix" color="gray-denim">AI</nve-avatar>
<p nve-text="body">To use the <code nve-text="code">nve-chat-message</code> first import the element.</p>
<nve-codeblock language="typescript"> import '@nvidia-elements/code/codeblock/define.js'; </nve-codeblock>
</nve-chat-message>
</section>
AI
Hello, how may I assist you today?
How do I use the chat message component?
NV
AI
To use the nve-chat-message first import the element.
import '@nvidia-elements/code/codeblock/define.js';
Edit Example
Chat conversation with prefix and suffix avatars. Ideal for multi-user chat applications where you need to distinguish between different participants.
<section nve-layout="column gap:lg full">
<nve-chat-message container="flat" style="margin-left: auto">
How do I use the chat message component?
</nve-chat-message>
<nve-chat-message container="flat">
Here's the steps you need to do follow to use the chat message component
<nve-codeblock language="typescript">
import '@nvidia-elements/core/chat-message/define.js';
<code nve-text="code"><nve-chat-message></nve-chat-message></code>
</nve-codeblock>
</nve-chat-message>
</section>
How do I use the chat message component?
Here's the steps you need to do follow to use the chat message component
import '@nvidia-elements/core/chat-message/define.js';
Edit Example
Chat messages with code blocks for technical discussions. Perfect for developer chat interfaces or documentation systems.
<nve-chat-message arrow-position="top-start" style="--top-offset: var(--nve-ref-space-sm)">
<nve-avatar slot="prefix" color="gray-denim">AI</nve-avatar>
Hello, how may I assist you today?
</nve-chat-message>
AI
Hello, how may I assist you today?
Edit Example
Custom top offset positioning for precise arrow placement. Useful when you need fine-tuned control over the chat bubble positioning.
<section nve-layout="column gap:md">
<nve-chat-message>Your deployment completed successfully. All services are running as expected.</nve-chat-message>
<nve-chat-message color="red-cardinal"
>Your deployment completed successfully. All services are running as expected.</nve-chat-message
>
<nve-chat-message color="gray-slate"
>Your deployment completed successfully. All services are running as expected.</nve-chat-message
>
<nve-chat-message color="gray-denim"
>Your deployment completed successfully. All services are running as expected.</nve-chat-message
>
<nve-chat-message color="blue-indigo"
>Your deployment completed successfully. All services are running as expected.</nve-chat-message
>
<nve-chat-message color="blue-cobalt"
>Your deployment completed successfully. All services are running as expected.</nve-chat-message
>
<nve-chat-message color="blue-sky"
>Your deployment completed successfully. All services are running as expected.</nve-chat-message
>
<nve-chat-message color="teal-cyan"
>Your deployment completed successfully. All services are running as expected.</nve-chat-message
>
<nve-chat-message color="green-mint"
>Your deployment completed successfully. All services are running as expected.</nve-chat-message
>
<nve-chat-message color="teal-seafoam"
>Your deployment completed successfully. All services are running as expected.</nve-chat-message
>
<nve-chat-message color="green-grass"
>Your deployment completed successfully. All services are running as expected.</nve-chat-message
>
<nve-chat-message color="yellow-amber"
>Your deployment completed successfully. All services are running as expected.</nve-chat-message
>
<nve-chat-message color="orange-pumpkin"
>Your deployment completed successfully. All services are running as expected.</nve-chat-message
>
<nve-chat-message color="red-tomato"
>Your deployment completed successfully. All services are running as expected.</nve-chat-message
>
<nve-chat-message color="pink-magenta"
>Your deployment completed successfully. All services are running as expected.</nve-chat-message
>
<nve-chat-message color="purple-plum"
>Your deployment completed successfully. All services are running as expected.</nve-chat-message
>
<nve-chat-message color="purple-violet"
>Your deployment completed successfully. All services are running as expected.</nve-chat-message
>
<nve-chat-message color="purple-lavender"
>Your deployment completed successfully. All services are running as expected.</nve-chat-message
>
<nve-chat-message color="pink-rose"
>Your deployment completed successfully. All services are running as expected.</nve-chat-message
>
<nve-chat-message color="green-jade"
>Your deployment completed successfully. All services are running as expected.</nve-chat-message
>
<nve-chat-message color="lime-pear"
>Your deployment completed successfully. All services are running as expected.</nve-chat-message
>
<nve-chat-message color="yellow-nova"
>Your deployment completed successfully. All services are running as expected.</nve-chat-message
>
<nve-chat-message color="brand-green"
>Your deployment completed successfully. All services are running as expected.</nve-chat-message
>
</section>
Your deployment completed successfully. All services are running as expected.
Your deployment completed successfully. All services are running as expected.
Your deployment completed successfully. All services are running as expected.
Your deployment completed successfully. All services are running as expected.
Your deployment completed successfully. All services are running as expected.
Your deployment completed successfully. All services are running as expected.
Your deployment completed successfully. All services are running as expected.
Your deployment completed successfully. All services are running as expected.
Your deployment completed successfully. All services are running as expected.
Your deployment completed successfully. All services are running as expected.
Your deployment completed successfully. All services are running as expected.
Your deployment completed successfully. All services are running as expected.
Your deployment completed successfully. All services are running as expected.
Your deployment completed successfully. All services are running as expected.
Your deployment completed successfully. All services are running as expected.
Your deployment completed successfully. All services are running as expected.
Your deployment completed successfully. All services are running as expected.
Your deployment completed successfully. All services are running as expected.
Your deployment completed successfully. All services are running as expected.
Your deployment completed successfully. All services are running as expected.
Your deployment completed successfully. All services are running as expected.
Your deployment completed successfully. All services are running as expected.
Your deployment completed successfully. All services are running as expected.
Edit Example
Defines a base color from the theme color palette
Color Description red-cardinal gray-slate gray-denim blue-indigo blue-cobalt blue-sky teal-cyan green-mint teal-seafoam green-grass yellow-amber orange-pumpkin red-tomato pink-magenta purple-plum purple-violet purple-lavender pink-rose green-jade lime-pear yellow-nova brand-green