Update widget settings or write your own CSS to customize Remark’s appearance
Remark ships two custom elements: <remark-chat-widget> for the floating chat and <remark-qa-activator> for the embedded chat (also known as the inline activator). Both share the same theme system and can be customized at two levels: through widget settings in the Remark dashboard, and through custom CSS targeting Shadow DOM parts and CSS custom properties. Widget settings handle the most common adjustments. Custom CSS picks up where widget settings leave off, giving you control over individual elements.
Widget Settings
Configure colors, typography, spacing, layout, and behavior from the dashboard.
CSS Custom Properties
Override sizing tokens and reference generated color tokens.
Shadow DOM Parts
Target specific elements using the ::part() pseudo-element.
Full Example
A complete example combining tokens and part selectors.
The Appearance page (Settings > Appearance) is the primary way to theme both widgets. These settings apply to the floating chat and the embedded chat together.
Setting
Controls
Brand color
Primary color used to generate the full theme palette
Color scheme
Light, dark, or auto (matches the user’s system preference)
Text color
Content and text color
Background color
Surface background color
Button color
Color of the chat input send button and floating activator button background
Border color
Border and divider color
Online indicator
Online/available status indicator color
Error color
Error and critical state color
Font family
Custom font stack (popular Google Fonts are loaded automatically)
Font size
Base font size in pixels (minimum 10 px) — all typography scales from this
Padding
Internal spacing (sm, md, lg, or a custom pixel value)
Border roundness
Corner radius (sm, md, lg, or a custom pixel value)
Spacing scale
Unitless multiplier that scales all internal spacing
Each palette color is optional. When a value isn’t provided, the theme system generates an appropriate color from the brand color automatically, with both light and dark mode variants.The Appearance page also includes a Custom CSS field for advanced overrides (see sections 2 and 3 below). Custom rules must target remark-chat-widget or remark-qa-activator in their selectors. The Custom CSS field supports @media, @supports, and other at-rules, so you can write responsive ::part() overrides directly in the dashboard.
The Inline Activator page (Settings > Features > Inline Activator) controls the embedded chat.
Setting
Controls
Enable activator
Show or hide the embedded chat
Activator type
Expert (shows featured expert header) or text-only
Interaction mode
Inline (conversations stay within the embedded chat) or handoff (opens the floating chat widget)
CSS selector
Which page element the embedded chat is inserted relative to
Activator position
Insert before or after the selected element
We recommend using widget settings over custom CSS when possible. Settings available in the dashboard have been tested to work cohesively and adapt to light and dark mode automatically.
The chat widget’s theme system generates CSS custom properties that you can reference in custom CSS rules. These properties are grouped into sizing tokens (which can be overridden directly) and color tokens (which are generated from widget settings).
These properties are set on the widget’s root element — <remark-chat-widget> or <remark-qa-activator>. Override them by targeting that element directly in your CSS, the same way you’d style any other HTML element. They correspond to dashboard settings but can also be overridden in custom CSS when finer control is needed.
Variable
Default
Controls
Dashboard Setting
--hem
16px
Base font size unit — all typography scales as a ratio of this value
Font size
--remark-spacing-multiplier
1
Unitless multiplier for all spacing tokens
Spacing scale
--remark-radii-base
0.5rem
Base border radius
Border roundness
--remark-fonts-sans
System font stack
Font family for all text
Font family
--hem stands for “host em” — it serves the same role as rem but is scoped to the widget’s shadow DOM root rather than the page’s <html> element. This means the widget’s typography scales independently of the host page’s font size. Font sizes are not exposed as individual variables; they are calculated as ratios of --hem (e.g., base text = --hem, small text = calc(var(--hem) * 14 / 16)). To scale all text proportionally, adjust the font size in the dashboard or override --hem in custom CSS.
--hem is already responsive to the host page’s root font size. If your site already adjusts font-size on <html> for different viewports, the widget may scale along with it automatically depending on your configuration.
Color tokens are generated from the brand color and palette overrides configured in the dashboard. They follow the naming pattern --remark-colors-{name} and have separate light and dark mode values.These tokens are set on an internal element within the shadow DOM. You can reference them in ::part() rules, but to change colors, use the dashboard palette settings rather than overriding variables directly.
Both remark-chat-widget and remark-qa-activator expose internal elements through the part attribute. You can target those elements from outside the shadow tree with the ::part() pseudo-element.Many parts carry scene suffixes so you can style the same structural element differently depending on context. The widget has three scenes: landing (before the conversation starts), chat (active conversation), and paused (conversation active on another device). For example, widget-header matches the header in any scene, while widget-header-landing targets only the landing screen header. Some elements also expose a skeleton token during loading states for styling placeholders.
These parts control the entry point to the floating chat — the button or text bar that visitors click to open the conversation. They are not present on the embedded chat (inline activator).
The outermost structural elements that wrap the widget’s header, content area, and footer. Scene suffixes let you style each section differently on the landing screen, during an active conversation, or while paused.
The header bar at the top of the chat, showing brand and expert info. Visible once the widget is open (floating) or always visible (embedded). The header-content container carries a scene suffix so you can style the header differently on the landing screen vs. during a conversation.
Dropdown menus accessible from the header — including options to mute, request a human, and adjust widget layout. The layout menu is only present in the floating chat. Menu button parts carry scene suffixes (e.g., header-menu-close-button-chat) so you can style them differently on the landing screen vs. during a conversation.
An introductory card shown before the conversation starts. Appears on the landing scene in both compact (embedded) and hero (floating) variants, depending on the activator type setting.
Shown when the visitor has an active conversation on another device or tab. Displays the matched expert’s avatar, a status message, suggested prompts, and a button to resume the conversation here.
A slide-over panel with the expert’s full profile, including bio and credentials. Opens when the visitor clicks “View Profile” on the expert profile card.
The conversation thread. Expert messages are grouped with an avatar; user messages appear on the opposite side. Each message bubble wraps markdown content.
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. Individual prompt buttons carry scene suffixes (e.g., prompt-button-landing) so you can style prompts differently by context.
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.
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.
Forms and prompts for collecting visitor information (email, name, phone) and feedback (NPS surveys). These appear at specific points during the conversation flow.
Placeholder elements shown while the widget loads. Skeleton elements use a -skeleton suffix (e.g., chat-header-avatar-skeleton) and also carry the skeleton token, so you can target a specific placeholder or style all loading states at once.
Part
Element
skeleton
Applied alongside -skeleton parts during loading states
Use ::part() on the host custom element. Replace the element name with whichever widget you are styling — remark-chat-widget for the floating chat or remark-qa-activator for the embedded chat (inline activator):
Copy
/* Floating chat: add a bottom border to the header during a conversation */remark-chat-widget::part(header-content-chat) { padding: 1rem 1.25rem; border-bottom: 1px solid var(--remark-colors-border-subtle);}/* Embedded chat: hide the profile card gallery */remark-qa-activator::part(expert-profile-card-gallery) { display: none;}
A common use case for the embedded chat is adding spacing above or below the widget to separate it from surrounding page content:
Copy
/* Add vertical spacing around the embedded chat */remark-qa-activator { margin-block: 2rem;}
You can use nested media queries to apply different styles at different viewport sizes:
In this example, the embedded chat uses the default base font size (16 px) on smaller screens and bumps it up on larger viewports.
Some parts are only present in specific UI states. For example, more-options-menu and layout-menu are only rendered while those dropdowns are open, and skeleton parts are only present while the widget is loading.
This example shows custom CSS that adjusts sizing tokens and styles individual parts. Colors and font family would typically be set through the dashboard rather than in CSS.
Copy
/* Override sizing tokens on both widgets */remark-chat-widget,remark-qa-activator { --hem: 18px; --remark-spacing-multiplier: 1.25; --remark-radii-base: 0.75rem;}/* Style individual parts (floating chat) */remark-chat-widget::part(header-content-chat) { padding: 1rem 1.25rem;}remark-chat-widget::part(chat-header-tagline) { color: var(--remark-colors-content-muted);}/* Style individual parts (embedded chat) */remark-qa-activator::part(product-recommendation) { border: 1px solid var(--remark-colors-border-subtle);}
Use widget settings first. The dashboard handles colors, typography, spacing, and border radius with built-in dark mode support. Reach for custom CSS only when you need to style a specific element differently.
Reference token variables in ::part() rules. When writing custom CSS, use the --remark-colors-* tokens rather than hardcoded color values so your overrides adapt to light and dark mode.
Style semantic parts, not layout wrappers. Prefer parts like header-content or product-recommendation over incidental containers.
Use scene suffixes for targeted styling. Parts like widget-header, header-menu-close-button, and prompt-button match all scenes. Append a scene name (e.g., widget-header-landing, header-menu-close-button-chat) to scope styles to a specific context.
Account for stateful parts. Menu, loading, and prompt parts may only render in specific states. Test your overrides in those states.
Check responsive layouts. Header menus, product cards, activators, and input affordances can shift across screen sizes.