> ## Documentation Index
> Fetch the complete documentation index at: https://docs.remark.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Message and content parts

> Style messages, inputs, recommendations, showcases, and loading states.

[Writing custom CSS](https://docs.remark.ai/sdk/styling/custom-css.md) · [Theme tokens](https://docs.remark.ai/sdk/styling/tokens.md)

## Shared Parts

These parts are shared by both the floating chat and the embedded chat (inline activator).

### Messages

The conversation thread. Expert messages are grouped with an avatar; user messages appear on the opposite side. Each message bubble wraps markdown content.

| Part | Element |
| - | - |
| `message-group` | Shared on expert and user message groups |
| `expert-message-group` | Expert message group (with avatar) |
| `user-message-group` | User message group container |
| `agent-message` | Avatar-and-content frame shared by expert messages, prompts, and the welcome message |
| `agent-message-content` | Content column inside the agent message frame |
| `agent-message-text` | Standalone agent text (prompts, confirmations, notices) |
| `message-bubble` | Shared on every message bubble — user, NPS summary, PII request |
| `user-message-bubble` | Individual user message bubble |
| `message-content` | Message text or markdown wrapper |
| `message-link` | Link inside markdown |
| `message-media` | Image, video, or other media attached to a message |
| `gallery` | Image gallery on a message with multiple images |
| `gallery-grid` | Gallery image grid |
| `gallery-item` | Individual gallery image wrapper |
| `gallery-item-trigger` | Button that opens a gallery image in the lightbox |
| `gallery-item-overflow` | "+N" overflow button on the last visible gallery image |
| `linked-product` | Product badge above a user message linked to a product |
| `linked-product-image` | Linked product thumbnail |
| `linked-product-name` | Linked product name |
| `system-message` | System message root |
| `system-message-body` | Message line inside a system message |
| `system-message-content` | System message text |
| `back-to-bottom-button` | Scroll-to-bottom button |
| `back-to-bottom-button-unread-badge` | Unread badge on scroll button |

### Message Prose

Markdown rendered in a message carries `part="prose"` on its container, and every element inside it is stamped with `prose-<tag>` — `prose-p`, `prose-a`, `prose-h2`, `prose-li`, and so on — so any rendered element can be styled individually. Links carry `message-link` alongside `prose-a`.

Block spacing inside prose is driven by custom properties set on the container, overridable through `::part(prose)`. Prefer these over margin overrides on the per-element parts — a variable keeps the first/last-child edge resets intact and covers grouped elements in one declaration:

| Variable | Controls |
| - | - |
| `--prose-paragraph-spacing` | Paragraph block margins |
| `--prose-list-spacing` | List block margins |
| `--prose-list-gap` | Gap between list items |
| `--prose-blockquote-spacing` | Blockquote block margins |
| `--prose-code-block-spacing` | Code block margins |
| `--prose-heading-spacing-start` / `--prose-heading-spacing-end` | Space before and after headings |
| `--prose-divider-spacing-start` / `--prose-divider-spacing-end` | Space before and after horizontal rules |
| `--prose-image-spacing` | Image block margins |

```css theme={null}
/* Wider paragraph spacing in every message */
remark-chat-widget::part(prose) {
  --prose-paragraph-spacing: 1.8rem;
}

/* Brand-colored links */
remark-chat-widget::part(prose-a) {
  color: var(--remark-colors-brand-content);
}
```

### Typing and Input

The text input area at the bottom of the chat, plus indicators shown while the expert or AI is composing a response.

| Part | Element |
| - | - |
| `typing-indicator` | Typing indicator container |
| `expert-connecting-indicator` | Expert connecting state |
| `carousel-avatar` | Individual avatar in the connecting-state carousel |
| `chat-input` | Input form |
| `chat-input-root` | Input root container |
| `chat-input-field` | Text input textarea |
| `chat-input-send-button` | Send button |
| `chat-input-attach-button` | Attach files button beside the input |
| `chat-input-actions` | Row holding the attach and send buttons when the input stacks them below the text |

### Attachments

Files the visitor attaches to a message, when attachments are enabled for your workspace. Staged files show in a preview strip above the input. Sent files that aren't images show as a list on the message, and sent images use the `gallery` parts in [Messages](#messages).

| Part | Element |
| - | - |
| `attachment-preview-strip` | Row of staged attachments above the input |
| `attachment-thumbnail` | Individual staged attachment |
| `attachment-thumbnail-image` | Image preview inside a staged attachment |
| `attachment-thumbnail-file` | File tile inside a staged attachment that isn't an image |
| `attachment-thumbnail-file-icon` | File type icon |
| `attachment-thumbnail-file-label` | File name label |
| `attachment-thumbnail-remove-button` | Remove button on a staged attachment |
| `attachments-container` | Attachment list root on a sent message |
| `attachments-label` | Heading above the list |
| `attachments-list` | List of attached files |
| `attachment-wrapper` | Individual list item |
| `attachment-item` | Download link for a file |
| `attachment-tile` | Paperclip icon inside the link |
| `attachment-caption` | File name caption |

### Prompts

Suggested questions shown on the landing screen, during a paused conversation, or as conversation starters. Visitors click a prompt to send it as their first message.

| Part | Element |
| - | - |
| `prompt-button` | Individual prompt button |
| `prompt-button-icon-container` | Icon wrapper |
| `prompt-button-icon` | Prompt icon |
| `prompt-button-text` | Prompt label text |
| `prompt-button-hover-symbol` | Hover accent symbol |
| `scene-prompts` | Prompts container |
| `scene-prompt-container` | Wrapper around each prompt on the landing screen |
| `prompt-skeleton` | Shimmering placeholder shown while prompts load |
| `conversation-starters-prompts` | Conversation starter prompts container |
| `generated-follow-ups-prompts` | Suggested follow-up questions under the latest answer |
| `activator-follow-ups-prompts` | Activator questions offered again beside the follow-up questions |

The `prompt-button` part also appears on `prompt-skeleton` placeholders and on the live try-on prompt, so a rule on `::part(prompt-button)` styles those too.

### Product Recommendations

Product cards shown inline when an expert or AI recommends items. Each card links to the product page and displays a thumbnail carousel, name, and price. The add-to-cart button adds the product directly, or opens a variant picker sheet when the product has options; a post-add toast offers checkout.

| Part | Element |
| - | - |
| `product-recommendations` | Carousel container wrapping the recommendation cards |
| `product-recommendations-list` | Scrolling row of cards inside the carousel |
| `product-recommendations-nav-button` | Carousel navigation arrow |
| `product-recommendation` | Product card root |
| `product-recommendation-thumbnail` | Image carousel container |
| `product-recommendation-image` | Product thumbnail image |
| `product-recommendation-add-to-cart` | Add-to-cart button on the card |
| `product-recommendation-details` | Name and price container |
| `product-recommendation-name` | Product name link |
| `product-recommendation-price` | Product price |
| `product-recommendation-cart-toast` | Toast shown after adding a recommended product to cart |
| `product-recommendation-cart-toast-checkout` | Checkout button inside the cart toast |
| `product-variant-sheet-link` | "View Product" link in the variant picker sheet |
| `product-variant-sheet-sold-out-warning` | Sold-out notice in the variant picker sheet |
| `price-details` | Price block, including the original price when discounted, on product cards, the variant picker sheet, the cart, and showcase hover cards |
| `product-thumbnail` | Product photo in the cart toast, the cart, the linked-product badge, and showcase hover cards |

### Presented Showcases

Scene-style imagery the agent generates from products in the catalog and presents inline in the conversation. A summary header introduces the showcase; hotspots on the rendered image let visitors hover for product details and add items directly to cart.

| Part | Element |
| - | - |
| `showcase` | Showcase frame root |
| `showcase-image` | The rendered showcase image |
| `showcase-summary` | Summary header above the image |
| `showcase-summary-title` | Showcase title text |
| `showcase-summary-items` | Featured product list inside the summary |
| `showcase-edge-gradients` | Edge-fade overlay on the showcase image |
| `showcase-styled-badge` | "AI styled" badge shown when the showcase uses a brand style anchor |
| `showcase-unavailable` | Frame state shown when a showcase is no longer available |
| `showcase-hotspot` | Hotspot button placed over a featured product |
| `showcase-hotspot-dot` | Idle dot indicator on a hotspot |
| `showcase-hotspot-cart` | Cart icon shown on hotspots with an actionable variant |
| `showcase-hotspot-add-to-cart` | Hotspot in its add-to-cart state |
| `showcase-hotspot-busy` | Busy indicator while adding to cart |
| `showcase-hotspot-hover-card` | Hover card root |
| `showcase-hotspot-hover-card-thumbnail` | Hover card image container |
| `showcase-hotspot-hover-card-image` | Hover card product image |
| `showcase-hotspot-hover-card-details` | Hover card name and price container |
| `showcase-hotspot-hover-card-name` | Hover card product name |
| `showcase-hotspot-hover-card-price` | Hover card product price |

### Content Previews

Rich previews for URLs shared in the conversation. Open Graph previews display an image, title, and optional price. YouTube links render an embedded video player.

| Part | Element |
| - | - |
| `content-preview` | Shared root for OG and YouTube previews |
| `content-preview-media-container` | Media wrapper |
| `og-preview` | OG preview root |
| `og-preview-image` | OG image |
| `og-preview-title` | OG title |
| `og-preview-price` | OG price |
| `youtube-preview` | YouTube preview root |
| `youtube-preview-video` | YouTube iframe |
| `youtube-preview-title` | YouTube title |

### Inline Cards

Interactive cards the agent renders inline in the conversation, such as discount codes and return-portal links. Every card shares the generic `card` part and a common anatomy, so you can style all cards at once, a specific kind by its own part, or a specific element by its anatomy part.

| Part | Element |
| - | - |
| `card` | Shared on every inline event card |
| `discount-card` | Discount-code card |
| `return-card` | Return-portal link card |
| `card-header` | Card header row |
| `card-media` | Card media area |
| `card-heading-group` | Heading and subheading wrapper |
| `card-heading` | Card heading |
| `card-subheading` | Card subheading |
| `card-badge` | Badge (e.g., the discount code) |
| `card-actions` | Action button row |
| `card-legal` | Fine-print text |

### Assistant Indicator

A small tag shown alongside messages to indicate whether the response came from an AI assistant or a human expert.

| Part | Element |
| - | - |
| `assistant-indicator` | AI or Human tag root |
| `assistant-indicator-label` | Tag label text |

### Footer

The bar at the bottom of the chat, containing terms of service text and Remark branding.

| Part | Element |
| - | - |
| `chat-footer` | Footer container |
| `inline-terms` | Terms of service text |
| `powered-by-line` | Line holding the AI disclosure and Powered by |
| `powered-by-note` | AI disclosure sentence, shown while an AI assistant is in the chat (see [Privacy and ADA compliance](https://docs.remark.ai/guides/privacy-ADA-compliance.md)) |
| `powered-by` | Powered by container |
| `powered-by-remark-text` | Powered by text |
| `powered-by-remark-logo` | Remark logo |

> [!WARNING]
>
> Avoid hiding the chat footer, terms text, or terms of service controls with custom CSS. These elements may contain legal disclosures or consent prompts that visitors need to see before using chat.

### Data Collection

Forms and prompts for collecting visitor information (email, name, phone) and feedback. These appear at specific points during the conversation flow. The NPS survey itself opens in a bottom sheet built from the widget's standard dialog elements; its rating request and summary appear in the message stream.

| Part | Element |
| - | - |
| `terms-of-service` | Terms of service consent container |
| `terms-of-service-consent-button` | TOS consent button |
| `terms-of-service-text` | TOS text content |
| `pii-request-form` | PII collection form |
| `pii-request-message-bubble` | PII request message |
| `pii-request-submit-error` | Error shown when PII submission fails |
| `otp-request-field` | Passcode entry that replaces the chat input during [email verification](https://docs.remark.ai/sdk/identifying-shoppers.md#verify-with-an-email-passcode) |
| `otp-request-email-field` | Email entry shown when the shopper changes the address to verify |
| `otp-request-notice` | Notice for an expired, verified, or exhausted passcode |
| `inline-nps-request` | Rating request card in the message stream |
| `nps-request-avatar` | Expert avatar on the rating request |
| `nps-summary-message-bubble` | NPS summary message |

### Skeleton and Loading

Placeholder elements shown while the widget loads. Skeleton elements use a `-skeleton` suffix (e.g., `chat-header-avatar-skeleton`). The shimmering placeholder blocks also carry the `skeleton` token, so you can target a specific placeholder or style them all at once.

| Part | Element |
| - | - |
| `skeleton` | Applied alongside `-skeleton` parts on shimmering placeholder blocks |
| `chat-header-skeleton` | Header skeleton container |
| `chat-header-avatar-skeleton` | Avatar placeholder |
| `chat-header-expert-name-skeleton` | Expert name placeholder |
| `chat-header-tagline-skeleton` | Tagline placeholder |
| `loading-dots` | Animated loading dots |
| `loading-dots-skeleton` | Loading dots shown while a conversation loads |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.