Chat Overview

The chat components are the building blocks of a conversation with an assistant or an agent. There are four of them, and they work together:

ComponentRole
dap-ds-chat-composerThe message entry box: a text field that grows with its content, a send button and slots for extra controls.
dap-ds-chat-message-listThe scrolling container of the conversation. It stays at the latest message while the user is at the bottom.
dap-ds-chat-messageOne message of the conversation, styled by who sent it.
dap-ds-chat-stepOne compact line that shows an action the assistant took, with its status.

The components only display the conversation and collect the next message. They do not store messages and do not talk to a server: your page listens to the events, sends the text, and adds the message elements.

When to Use

✅ Use the chat components when:

  • Users talk to an assistant or an agent in a conversation that grows while they watch
  • A reply can take time, is written piece by piece, and the user must be able to stop it
  • The assistant does work between its replies that the user should see

❌ Don't use the chat components for:

  • A field of a form that is submitted with other fields (use a textarea instead)
  • Search (use a search field instead)
  • Feedback about the page or a form (use a callout or feedback message instead)
  • The steps of a process the user completes (use a stepper instead)
  • A history of dated events (use a timeline instead)
Examples Conversation

A message list above a composer makes a chat. Give the list the remaining height of a column layout, so the conversation scrolls and the composer stays in place:

The conversation started at 10:40. How do I renew my passport? You can renew your passport online or at a government office. Do you want me to list the documents you need? Yes, please. You need your current passport and a valid identity card. The new passport is ready in 20 days.
Wiring it together

The composer fires dds-submit with the text in event.detail.value. Add the message of the user to the list, show a step while the assistant works, then stream the reply into a new message. Handle both ways a reply can end early: the user stops it, or it fails:

<div style="display: flex; flex-direction: column; gap: var(--dds-spacing-300); height: 32rem">
  <dap-ds-chat-message-list id="list" style="flex: 1; min-height: 0">
    <dap-ds-chat-message name="Assistant" timestamp="10:40">Hello! How can I help you today?</dap-ds-chat-message>
  </dap-ds-chat-message-list>
  <dap-ds-chat-composer id="composer" placeholder="Ask a question"></dap-ds-chat-composer>
</div>

<script>
  const list = document.querySelector('#list')
  const composer = document.querySelector('#composer')
  let controller

  const create = (tag, props) =>
    Object.assign(document.createElement(tag), props)

  composer.addEventListener('dds-submit', async event => {
    const step = create('dap-ds-chat-step', {
      label: 'Searching the knowledge base',
    })
    const reply = create('dap-ds-chat-message', { streaming: true })

    list.append(
      create('dap-ds-chat-message', {
        sender: 'user',
        textContent: event.detail.value,
      }),
      step,
    )
    // The user sent a message, so show it even if they had scrolled up
    list.scrollToBottom()
    composer.busy = true
    composer.status = undefined
    controller = new AbortController()

    try {
      const stream = await askAssistant(event.detail.value, controller.signal)
      Object.assign(step, {
        status: 'success',
        label: 'Searched the knowledge base',
      })
      list.append(reply)
      for await (const chunk of stream) {
        reply.textContent += chunk
      }
    } catch (error) {
      const stopped = error.name === 'AbortError'

      // The reply ended before the search did, so the step must not keep spinning
      if (step.status === 'running') {
        if (stopped) {
          step.remove()
        } else {
          Object.assign(step, {
            status: 'error',
            label: 'Search the knowledge base',
          })
        }
      }
      if (!stopped) {
        composer.status = 'error'
        composer.statusText = 'The reply could not be loaded. Try again.'
      }
    } finally {
      reply.streaming = false
      composer.busy = false
    }
  })

  composer.addEventListener('dds-stop', () => controller?.abort())
</script>

Each component has its own import subpath, so a page that uses all four imports all four:

import 'dap-design-system/components/chat-composer'
import 'dap-design-system/components/chat-message-list'
import 'dap-design-system/components/chat-message'
import 'dap-design-system/components/chat-step'
Composer Default

The Enter key and the send button send the message. Shift+Enter inserts a line break. The send button is disabled while the field is empty or holds only whitespace:

Handling the message

The field is cleared after dds-submit, unless you call preventDefault(), for example to keep the text when it cannot be sent:

composer.addEventListener('dds-submit', event => {
  if (!navigator.onLine) {
    // Keep the text in the field
    event.preventDefault()
    composer.status = 'error'
    composer.statusText = 'You are offline. Try again later.'
    return
  }
  sendMessage(event.detail.value)
})

Set submitOnEnter="false" when the Enter key should insert a line break. The message is then sent only with the send button.

The composer has two methods: focus() moves the focus to the text field, and clear() empties it without firing dds-input.

Busy

Set busy while a reply is being generated. The send button becomes a stop button that fires dds-stop, and sending is blocked. The user can still type the next message:

Disabled

disabled turns off the text field and the send or stop button:

Rows

The field starts at minRows (1 by default) and grows with the text up to maxRows (8 by default). After that it scrolls. maxlength limits the number of characters:

Status

Set status to error or warning and give the message in statusText. The message is shown only when both are set. Use the status slot when the message needs markup, such as a link:

The message sits under the box by default. Set statusPosition="top" to show it above:

Elevation

The box is lifted with a shadow by default (elevation="low"), which suits a composer that floats over the conversation. elevation="none" draws it like an input, with a border and hover and focus states:

Composer slots

The header slot is a row above the text field, for example for attachments. The footer slot holds actions at the start of the bottom row, and the send-actions slot holds controls just before the send button. Slots you leave empty take no space:

kerelem.pdf
Message list Scrolling conversation

The list fills the height of its container, so give the container a height, or set --dds-chat-message-list-height or --dds-chat-message-list-max-height. Scroll up in the example to see the "jump to the latest message" button:

How do I renew my passport? You can renew your passport online or at a government office. Do you want me to list the documents you need? Yes, please. You need your current passport and a valid identity card. The new passport is ready in 20 days. How much does it cost? The fee depends on your age and on how long the passport is valid.
Following new content

While the user is at the bottom, the list stays at the bottom when a message is added or a streaming message grows. After the user scrolls up, the list does not move, so reading is never interrupted.

Call scrollToBottom() to return to the latest message and follow new content again, for example right after the user sends a message. The scroll is smooth by default and instant for users who prefer reduced motion; pass an options object with behavior: 'auto' for an instant scroll.

dds-scroll-end-change fires when the list reaches or leaves the latest message, with the new state in event.detail.atEnd.

Set autoScroll="false" to turn following off. The list then moves only when the user scrolls or presses the button.

Empty state

Content in the empty slot is shown while the list has no messages:

Ask a question to start the conversation.
Messages Senders

sender is assistant by default. Set it to user for the messages of the user and to system for notes about the conversation. User messages sit at the end of the row, assistant messages at the start, and system messages are small centered notes without a bubble:

The conversation started at 10:40. How do I renew my passport? You can renew your passport online. Do you want me to list the documents you need?
Name and timestamp

name and timestamp are shown above the bubble. The timestamp is plain text: format it on your page, in the language of the user:

You can renew your passport online. Do you want me to list the documents you need?
Streaming

Set streaming while the message is being written. A typing indicator follows the content, also while the message is still empty. Add the text as it arrives and remove streaming when the reply is complete:

You can renew your passport
Avatar, meta and actions

Put an avatar in the avatar slot, extra information such as sources or a delivery state in the meta slot, and controls such as a copy button in the actions slot. Slots you leave empty take no space:

You can renew your passport online. Do you want me to list the documents you need? Source: Government portal
Plain text and rich content

When the content is only text, its line breaks are kept, so a message typed with Shift+Enter looks the way it was written. When the content has elements, normal HTML whitespace rules apply:

First line Second line A new paragraph

You need the following documents:

  • your current passport,
  • a valid identity card.

The message renders what you put in it. If a reply contains Markdown or HTML from a model or from another user, convert and sanitize it on your page before you insert it.

Steps Step status

status is running by default and shows a spinner. Set it to success or error when the action ends. Change the label with it, so the text matches the state:

Detail and extra content

detail is a secondary text after the label, for example a size, a count or an identifier. Content in the default slot is shown under the line; use it to explain a failure or to give a short result:

The file is larger than 5 MB.
Updating a step

Keep the element and change its properties when the action ends:

const step = document.createElement('dap-ds-chat-step')
step.label = 'Searching the knowledge base'
list.append(step)

const results = await search(query)

step.status = 'success'
step.label = 'Searched the knowledge base'
step.detail = `${results.length} results`
Custom Styling

Every chat component has its own CSS custom properties and parts; the tables at the end of this page list them. Set the properties on the component they belong to:

How do I renew my passport? You can renew your passport online or at a government office.
Accessibility Composer
  • Name of the field: the text field has no visible label. Its accessible name is a localized "Message"; set label when the page needs a more specific name. The placeholder is not a label.
  • Keyboard: Enter sends the message and Shift+Enter inserts a line break. Enter is ignored while an IME composition is in progress, so confirming a candidate does not send the message.
  • Send and stop button: the button has a localized accessible name that changes with busy. Override the names with sendButtonLabel and stopButtonLabel. After a click on the send button the focus returns to the text field.
  • Status: the status message is linked to the text field with aria-describedby. An error is announced at once (role="alert") and marks the field invalid; a warning is announced politely (role="status").
Message list
  • Live region: the scrolling region has the log role and is a polite live region, so screen readers announce new messages without interrupting the user.
  • Name: the region is named with a localized "Conversation". Set label when the page has several conversations or needs a more specific name.
  • Keyboard: the scrolling region is focusable, so keyboard users can scroll it with the keyboard.
  • Scroll button: the "jump to the latest message" button has a localized accessible name; override it with scrollButtonLabel. After it is pressed it disappears, and the focus moves to the scrolling region instead of being lost.
  • Focus: the list never moves the focus when a message arrives. Keep the focus in the composer so the user can go on typing.
Messages
  • Structure: each message is an article.
  • Who is speaking: the sides and colors are not available to screen reader users. A message with a name is introduced by that name; without one, a visually hidden, localized sender ("You", "Assistant" or "System") is read before the content.
  • Streaming: a streaming message has aria-busy="true", and the typing indicator is hidden from assistive technology.
  • Avatar: when the name is shown next to it, the avatar is decorative; give it an empty alt.
Steps
  • Status as text: the spinner and the icons are hidden from assistive technology. The status is read as visually hidden, localized text before the label, so it does not depend on color or shape.
  • Label: write the label so that it makes sense on its own, and update it when the status changes ("Creating page" becomes "Created page").
  • Extra content: explain a failure in words in the default slot; do not rely on the error icon.
Slotted controls

The controls you put in the slots of the composer and the messages keep their own names, roles and keyboard behavior. Give icon buttons an aria-label that says what they act on.

Importing Per-component import (Recommended)

Import the component by its own subpath. This registers <dap-ds-chat-composer> (and the components it renders internally) and lets your bundler include only what you use:

import 'dap-design-system/components/chat-composer'

Need a reference to the class (e.g. to register it manually or extend it)? The same subpath default-exports it:

import DapDSChatComposer from 'dap-design-system/components/chat-composer'
Register everything

Register the whole library at once — convenient, but pulls every component into your bundle:

import 'dap-design-system'
Importing React
import { DapDSChatComposerReact } from 'dap-design-system/react'
Attributes
PropertyTypeDefaultDescription
valuestring''The text of the message.
placeholderstringThe placeholder of the text field.
labelstringThe accessible name of the text field. Defaults to a localized "Message".
disabledbooleanfalseWhether the composer is disabled. Disables the text field and the send or stop button.
busybooleanfalseWhether a reply is being generated. The send button becomes a stop button and submitting is blocked; the user can still type.
minRowsnumber1The number of text rows shown when the field is empty.
maxRowsnumber8The number of text rows the field grows to before it scrolls.
maxlengthnumber, undefinedThe maximum number of characters of the message.
submitOnEnterbooleantrueWhether the Enter key sends the message. Shift+Enter always inserts a line break. Set submitOnEnter="false" to turn it off.
status'error', 'warning' , undefinedThe status of the composer.
statusTextstringThe status message. Shown when status is set; the status slot overrides it.
statusPosition'top', 'bottom''bottom'Where the status message is shown, relative to the box.
elevation'low', 'none''low'The elevation of the box. low lifts it with a shadow; none draws an input style border with hover and focus states.
sendButtonLabelstringThe accessible name of the send button. Defaults to a localized "Send".
stopButtonLabelstringThe accessible name of the stop button. Defaults to a localized "Stop".
autofocusbooleanfalseWhether the text field takes the focus when the page loads.
ariaLabelstring, nullnullAccessible label for the element. Use this to provide a text alternative
for elements that don't have visible text content.
ariaExpanded'true', 'false'nullIndicates whether the element is expanded or collapsed.
ariaControlsstring, nullnullIdentifies the element that is controlled by this element.
ariaHasPopupstring, nullnullIndicates the availability and type of interactive popup element.
ariaDescribedBystring, nullnullIdentifies the element that describes the current element.
ariaPressed'true', 'false' , 'mixed'nullIndicates the current "pressed" state of toggle buttons.
ariaHidden'true', 'false'nullIndicates whether the element is hidden from accessibility APIs.
customStylesstring, undefinedCustom CSS text to be merged with the component's styles.
This CSS will be injected into the shadow DOM and merged with the component's static styles.
Slots
NameDescription
headerA row above the text field, for example attachments or context.
footerActions at the start of the bottom row, for example an attach button.
send-actionsControls just before the send button, for example a microphone button.
statusThe status message. Overrides `statusText`.
Events
Event NameDescriptionType
dds-inputFired when the text changes.{value: string }
dds-submitFired when the message is sent with the send button or the Enter key. Cancelable: unless it is prevented, the field is cleared.{value: string }
dds-stopFired when the stop button is pressed while `busy`.{void }
CSS Parts
Part NameDescription
baseThe main chat composer container.
bodyThe box around the header, the text field and the bottom row.
headerThe wrapper of the header slot.
textareaThe native textarea.
footerThe wrapper of the footer slot.
send-actionsThe wrapper of the send-actions slot.
send-buttonThe send button, which is the stop button while `busy`.
statusThe status message.
How to Use CSS Parts

You can style CSS parts using the ::part() pseudo-element selector:

/* Target a specific part */
.my-custom-dap-ds-chat-composer::part(base) {
  /* Your custom styles */
}

/* Target multiple parts */
.my-custom-dap-ds-chat-composer::part(base),
.my-custom-dap-ds-chat-composer::part(body) {
  /* Shared styles */
}

Example usage:

<dap-ds-chat-composer class="my-custom-dap-ds-chat-composer">
  Chat
</dap-ds-chat-composer>
.my-custom-dap-ds-chat-composer::part(base) {
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

CSS parts allow you to style internal elements of the component while maintaining encapsulation. Learn more in our styling guide.

CSS Custom Properties
Property NameDescription
--dds-chat-composer-gapGap between the box and the status message. (default: var(--dds-spacing-200))
--dds-chat-composer-body-gapGap between the header, the text field and the bottom row. (default: var(--dds-spacing-200))
--dds-chat-composer-paddingPadding of the box. (default: var(--dds-spacing-300))
--dds-chat-composer-backgroundBackground of the box. (default: var(--dds-fields-background-default))
--dds-chat-composer-colorText color of the text field. (default: var(--dds-text-neutral-base))
--dds-chat-composer-placeholder-colorColor of the placeholder. (default: var(--dds-text-neutral-placeholder))
--dds-chat-composer-font-sizeFont size of the text field. (default: var(--dds-font-base))
--dds-chat-composer-line-heightLine height of the text field. (default: var(--dds-font-line-height-xlarge))
--dds-chat-composer-border-radiusBorder radius of the box. (default: var(--dds-radius-large))
--dds-chat-composer-border-widthBorder width of the box. (default: var(--dds-border-width-base))
--dds-chat-composer-border-colorBorder color of the box with `elevation="none"`. (default: var(--dds-border-neutral-base))
--dds-chat-composer-hover-border-colorBorder color of the box on hover with `elevation="none"`. (default: var(--dds-border-neutral-strong))
--dds-chat-composer-elevated-border-colorBorder color of the box with `elevation="low"`. (default: var(--dds-border-neutral-divider))
--dds-chat-composer-shadowShadow of the box with `elevation="low"`. (default: 0 var(--dds-spacing-50) var(--dds-spacing-300) var(--dds-black-10))
--dds-chat-composer-error-border-colorBorder color of the box with the error status. (default: var(--dds-border-negative-base))
--dds-chat-composer-warning-border-colorBorder color of the box with the warning status. (default: var(--dds-border-warning-base))
--dds-chat-composer-disabled-backgroundBackground of the disabled box. (default: var(--dds-fields-background-disabled))
--dds-chat-composer-disabled-colorText color of the disabled text field. (default: var(--dds-text-neutral-disabled))
--dds-chat-composer-actions-gapGap between the controls of the bottom row. (default: var(--dds-spacing-200))
--dds-chat-composer-status-font-sizeFont size of the status message. (default: var(--dds-font-sm))
--dds-chat-composer-status-error-colorText color of the error status message. (default: var(--dds-text-negative-subtle))
--dds-chat-composer-status-error-icon-colorIcon color of the error status message. (default: var(--dds-icon-negative-subtle))
--dds-chat-composer-status-warning-colorText color of the warning status message. (default: var(--dds-text-neutral-base))
--dds-chat-composer-status-warning-icon-colorIcon color of the warning status message. (default: var(--dds-icon-warning-subtle))
How to Use CSS Custom Properties

CSS custom properties (CSS variables) can be set directly on the component or in your stylesheet:

Method 1: Inline styles (Quick customization)

<dap-ds-chat-composer
  style="--dds-chat-composer-gap: value; --dds-chat-composer-body-gap: value;">
  Chat
</dap-ds-chat-composer>

Method 2: CSS classes (Reusable styles)

.my-custom-dap-ds-chat-composer {
  --dds-chat-composer-gap: value;
  --dds-chat-composer-body-gap: value;
  --dds-chat-composer-padding: value;
}
<dap-ds-chat-composer class="my-custom-dap-ds-chat-composer">
  Chat
</dap-ds-chat-composer>

Method 3: Global theme customization

/* Apply to all instances */
dap-ds-chat-composer {
  --dds-chat-composer-gap: value;
  --dds-chat-composer-body-gap: value;
}

CSS custom properties inherit through the Shadow DOM, making them perfect for theming. Changes apply immediately without rebuilding.

Components Chat message <dap-ds-chat-message/> Attributes
PropertyTypeDefaultDescription
sender'user', 'assistant' , 'system''assistant'Who sent the message. It sets the alignment and the colors, and the visually hidden sender prefix when there is no name.
namestringThe name of the author, shown above the content.
timestampstringThe time of the message as preformatted text, shown next to the name.
streamingbooleanfalseWhether the message is still being written. Sets aria-busy and shows a typing indicator after the content.
ariaLabelstring, nullnullAccessible label for the element. Use this to provide a text alternative
for elements that don't have visible text content.
ariaExpanded'true', 'false'nullIndicates whether the element is expanded or collapsed.
ariaControlsstring, nullnullIdentifies the element that is controlled by this element.
ariaHasPopupstring, nullnullIndicates the availability and type of interactive popup element.
ariaDescribedBystring, nullnullIdentifies the element that describes the current element.
ariaPressed'true', 'false' , 'mixed'nullIndicates the current "pressed" state of toggle buttons.
ariaHidden'true', 'false'nullIndicates whether the element is hidden from accessibility APIs.
customStylesstring, undefinedCustom CSS text to be merged with the component's styles.
This CSS will be injected into the shadow DOM and merged with the component's static styles.
Slots
NameDescription
(default)The content of the message. Line breaks of plain text are kept.
avatarThe avatar of the sender.
actionsActions for the message, such as a copy button.
metaExtra information under the message, such as a delivery state or sources.
Events

No custom events available.

CSS Parts
Part NameDescription
baseThe main chat message container.
avatarThe wrapper of the avatar slot.
mainThe column with the header, the bubble, the meta and the actions.
headerThe row with the author name and the timestamp.
nameThe author name.
timestampThe timestamp.
bubbleThe bubble around the content.
contentThe wrapper of the message content.
typing-indicatorThe indicator shown while the message is streaming.
metaThe wrapper of the meta slot.
actionsThe wrapper of the actions slot.
CSS Custom Properties
Property NameDescription
--dds-chat-message-gapGap between the avatar and the message. (default: var(--dds-spacing-200))
--dds-chat-message-content-gapGap between the header, the bubble, the meta and the actions. (default: var(--dds-spacing-100))
--dds-chat-message-max-widthMaximum width of the message without the avatar. (default: 80%)
--dds-chat-message-paddingPadding of the bubble. (default: var(--dds-spacing-200) var(--dds-spacing-300))
--dds-chat-message-border-radiusBorder radius of the bubble. (default: var(--dds-radius-large))
--dds-chat-message-border-widthBorder width of the bubble. (default: var(--dds-border-width-base))
--dds-chat-message-font-sizeFont size of the content. (default: var(--dds-font-base))
--dds-chat-message-header-font-sizeFont size of the author name and the timestamp. (default: var(--dds-font-sm))
--dds-chat-message-name-colorColor of the author name. (default: var(--dds-text-neutral-strong))
--dds-chat-message-timestamp-colorColor of the timestamp and the meta content. (default: var(--dds-text-neutral-subtle))
--dds-chat-message-user-backgroundBackground color of a user message. (default: var(--dds-background-brand-base))
--dds-chat-message-user-colorText color of a user message. (default: var(--dds-text-neutral-base))
--dds-chat-message-user-border-colorBorder color of a user message. (default: var(--dds-border-brand-subtle))
--dds-chat-message-assistant-backgroundBackground color of an assistant message. (default: var(--dds-background-neutral-base))
--dds-chat-message-assistant-colorText color of an assistant message. (default: var(--dds-text-neutral-base))
--dds-chat-message-assistant-border-colorBorder color of an assistant message. (default: var(--dds-border-neutral-divider))
--dds-chat-message-system-colorText color of a system message. (default: var(--dds-text-neutral-subtle))
--dds-chat-message-system-font-sizeFont size of a system message. (default: var(--dds-font-sm))
--dds-chat-message-typing-colorColor of the typing indicator. (default: var(--dds-icon-neutral-subtle))
Chat message list <dap-ds-chat-message-list/> Attributes
PropertyTypeDefaultDescription
labelstringThe accessible name of the list. Defaults to a localized "Conversation".
autoScrollbooleantrueWhether the list follows new content. While the user is at the bottom, the list stays at the bottom when content is added or grows.
After the user scrolls up, the list does not move and a "scroll to latest" button is shown. Set autoScroll="false" to turn it off.
scrollButtonLabelstringThe accessible name of the "scroll to latest" button. Defaults to a localized text.
ariaLabelstring, nullnullAccessible label for the element. Use this to provide a text alternative
for elements that don't have visible text content.
ariaExpanded'true', 'false'nullIndicates whether the element is expanded or collapsed.
ariaControlsstring, nullnullIdentifies the element that is controlled by this element.
ariaHasPopupstring, nullnullIndicates the availability and type of interactive popup element.
ariaDescribedBystring, nullnullIdentifies the element that describes the current element.
ariaPressed'true', 'false' , 'mixed'nullIndicates the current "pressed" state of toggle buttons.
ariaHidden'true', 'false'nullIndicates whether the element is hidden from accessibility APIs.
customStylesstring, undefinedCustom CSS text to be merged with the component's styles.
This CSS will be injected into the shadow DOM and merged with the component's static styles.
Slots
NameDescription
(default)The messages and steps of the conversation.
emptyContent shown while there are no messages.
Events
Event NameDescriptionType
dds-scroll-end-changeFired when the list reaches or leaves the latest message.{atEnd: boolean }
CSS Parts
Part NameDescription
baseThe main chat message list container.
viewportThe scrolling region with the `log` role.
contentThe wrapper of the messages.
emptyThe wrapper of the empty slot.
scroll-buttonThe button that scrolls to the latest message.
CSS Custom Properties
Property NameDescription
--dds-chat-message-list-gapGap between the messages. (default: var(--dds-spacing-400))
--dds-chat-message-list-paddingPadding of the scrolling region. (default: var(--dds-spacing-400))
--dds-chat-message-list-heightHeight of the list. (default: 100%)
--dds-chat-message-list-max-heightMaximum height of the list. (default: none)
--dds-chat-message-list-backgroundBackground of the list. (default: transparent)
--dds-chat-message-list-scroll-button-offsetDistance of the scroll button from the bottom of the list. (default: var(--dds-spacing-300))
--dds-chat-message-list-scroll-button-backgroundBackground of the scroll button. (default: var(--dds-background-neutral-subtle))
--dds-chat-message-list-scroll-button-border-colorBorder color of the scroll button. (default: var(--dds-border-neutral-base))
Chat step <dap-ds-chat-step/> Attributes
PropertyTypeDefaultDescription
status'running', 'success' , 'error''running'The status of the step. It is shown by the indicator and also given as visually hidden text.
labelstringThe main text of the step, for example the action the assistant took.
detailstringThe secondary text of the step, for example a size or an identifier.
ariaLabelstring, nullnullAccessible label for the element. Use this to provide a text alternative
for elements that don't have visible text content.
ariaExpanded'true', 'false'nullIndicates whether the element is expanded or collapsed.
ariaControlsstring, nullnullIdentifies the element that is controlled by this element.
ariaHasPopupstring, nullnullIndicates the availability and type of interactive popup element.
ariaDescribedBystring, nullnullIdentifies the element that describes the current element.
ariaPressed'true', 'false' , 'mixed'nullIndicates the current "pressed" state of toggle buttons.
ariaHidden'true', 'false'nullIndicates whether the element is hidden from accessibility APIs.
customStylesstring, undefinedCustom CSS text to be merged with the component's styles.
This CSS will be injected into the shadow DOM and merged with the component's static styles.
Slots
NameDescription
(default)Optional extra content shown under the line, such as an error explanation.
Events

No custom events available.

CSS Parts
Part NameDescription
baseThe main chat step container.
lineThe line with the status indicator, the label and the detail.
indicatorThe status indicator (spinner or icon). It is hidden from assistive technology; the status is given as hidden text.
labelThe main text of the step.
detailThe secondary text of the step.
contentThe wrapper of the extra content.
CSS Custom Properties
Property NameDescription
--dds-chat-step-gapGap between the indicator, the label and the detail. (default: var(--dds-spacing-200))
--dds-chat-step-content-gapGap between the line and the extra content. (default: var(--dds-spacing-100))
--dds-chat-step-font-sizeFont size of the step. (default: var(--dds-font-sm))
--dds-chat-step-colorColor of the label. (default: var(--dds-text-neutral-base))
--dds-chat-step-detail-colorColor of the detail and the extra content. (default: var(--dds-text-neutral-subtle))
--dds-chat-step-indicator-sizeWidth and height reserved for the status indicator. (default: var(--dds-spacing-400))
--dds-chat-step-success-colorColor of the success icon. (default: var(--dds-icon-positive-subtle))
--dds-chat-step-error-colorColor of the error icon. (default: var(--dds-icon-negative-subtle))