CSS Variables
Override CSS custom properties to customize colors, fonts, and spacing.
Shadow DOM Parts
Target specific components using Shadow DOM parts for precise control.
1. CSS Custom Properties
The Q&A Activator defines many CSS variables on its host element. Overriding these variables (either locally on the activator element or globally) lets you customize the look and feel without having to dig into the component’s internals.1.1. Font Sizes
| Variable | Default Value | Purpose |
|---|---|---|
--remark-font-size-xxsmall | 7px | Extra-extra small text size |
--remark-font-size-xsmall | 10px | Extra small text size |
--remark-font-size-small | 12px | Small text size |
--remark-font-size-default | 14px | Default text size |
--remark-font-size-medium | 16px | Medium text size (often for sub-headings) |
--remark-font-size-large | 18px | Large text size |
--remark-font-size-xlarge | 24px | Extra large text size |
--remark-font-size-h1 | 28px | Heading level 1 |
--remark-font-size-h2 | 24px | Heading level 2 |
--remark-font-size-h3 | 21px | Heading level 3 |
--remark-font-size-h4 | 18px | Heading level 4 |
1.2. Blur Effects
| Variable | Default Value | Purpose |
|---|---|---|
--remark-blurs-loading-container | 4px | Blur effect for loading state on container elements |
--remark-blurs-loading-text | 8px | Blur effect for loading state on text elements |
1.3. Line Heights & Font Families
| Variable | Default Value | Purpose |
|---|---|---|
--remark-line-heights-default | 145% | Base line height for text |
--remark-fonts-font-family | Inter, sans-serif | Main font family |
--remark-fonts-font-family-headings | Inter, sans-serif | Font family used for headings |
1.4. Component Sizes and Layout
| Variable | Default Value | Purpose |
|---|---|---|
--remark-sizes-input-width | 640px | Width of the text input |
--remark-sizes-constrained-width | 800px | Maximum width for constrained layouts |
--remark-sizes-avatar-rotation | rotate(-3deg) | Applied rotation for the expert’s avatar |
--remark-sizes-bottom-toggle-position | 0px | Position adjustment for the bottom toggle element |
1.5. Opacity
| Variable | Default Value | Purpose |
|---|---|---|
--remark-opacity-activator-opacity | 1 | Opacity for activator elements |
--remark-opacity-loading | 0.4 | Opacity level during loading states |
1.6. Colors
A large set of color variables control text, backgrounds, borders, and status indicators.| Variable | Default Value | Purpose |
|---|---|---|
--remark-colors-theme-root | #ff9173 | Base theme color |
--remark-colors-content-inverted | #ffffff | Text color for inverted (dark on light) elements |
--remark-colors-content-default | #000000 | Default text color |
--remark-colors-content-subtle | #484848 | Subtle text color |
--remark-colors-content-muted | #929292 | Muted text color |
--remark-colors-content-success | #007F6D | Color to denote success |
--remark-colors-content-error | #752522 | Color to denote error |
--remark-colors-primary-emphasis | #f26747 | Emphasized primary action color |
--remark-colors-primary-default | #ff9173 | Primary color |
--remark-colors-primary-subtle | #feb497 | Subtle primary color |
--remark-colors-bg-primary | #fff3ed | Primary background color |
--remark-colors-bg-default | #ffffff | Default background color |
--remark-colors-bg-subtle | #f5f5f5 | Subtle background color |
--remark-colors-border-primary | #ffd5c4 | Primary border color |
--remark-colors-border-default | #cccccc | Default border color |
--remark-colors-border-table | #E5E7EB | Border color used in tables |
--remark-colors-border-success | #B0E4DD | Border color for success states |
--remark-colors-border-error | #F9E3E2 | Border color for error states |
--remark-colors-border-subtle | #ebebeb | Subtle border color |
--remark-colors-status-online | #02b09b | Indicator color for “online” status |
--remark-colors-powered-by | #cccccc | Color for “powered by” or branding elements |
--remark-colors-hover-overlay | #cfcfcf4d | Color overlay applied on hover |
--remark-colors-chat-default | #FFFFFF | Default background for chat bubbles |
--remark-colors-chat-emphasis | #ECF8F7 | Emphasized background for chat bubbles |
1.7. Borders, Radii, and Spacing
| Variable | Default Value | Purpose |
|---|---|---|
| Borders | ||
--remark-borders-default | 1.5px solid | Standard border style |
| Border Radii | ||
--remark-radii-xsmall | 4px | Extra small border radius |
--remark-radii-small | 8px | Small border radius |
--remark-radii-default | 12px | Default border radius |
--remark-radii-input | 12px | Border radius for input elements |
| Spacing | ||
--remark-spacing-xsmall | 4px | Extra small spacing |
--remark-spacing-small | 8px | Small spacing |
--remark-spacing-default | 16px | Default spacing |
--remark-spacing-large | 24px | Large spacing |
--remark-spacing-xlarge | 32px | Extra large spacing |
2. Shadow DOM Parts
Because the Q&A Activator is built using Shadow DOM, certain internal elements are exposed via the part attribute. You can style these parts with the ::part() pseudo-element from outside the shadow tree.2.1. Available Parts
Here is a list of the key parts you can target:Activator Parts
parent-container: The root container that wraps the entire Q&A Activator.expert-header-container: The header section containing the expert’s avatar, name, and additional information.expert-avatar-container: Container for the expert’s avatar (typically includes rotation or loading effects).expert-avatar-name: The name of the expert.expert-avatar-clover: The small clover icon next to the expert’s name.expert-avatar-expertise: The expertise of the expert.we-run-with-remark: The text “We run with Remark” in the footer.online-indicator: Visual cue (a small circle) indicating the expert’s online status.expert-chat-message: The container displaying the expert’s chat message or bio.input-group: Groups the text input area and send button for the user’s message.activator-button: Buttons used to activate questions or actions.activator-button-text: The text inside the activator button.
Chat Widget Parts
Activator Components
Parts related to the floating activator and expert introduction card.activator-card-parent,activator-card-close-button,activator-card-open-buttonexpert-activator-parentmain-activator-button-parent,main-activator-button,main-activator-button-unread-message-count-bubble,main-activator-button-unread-message-count-bubble-text,main-activator-button-activator-imagemobile-activator-parent,mobile-activator-close-button,mobile-activator-close-button-text,mobile-activator-open-button,mobile-activator-open-button-image,mobile-activator-unread-message-count-bubble,mobile-activator-unread-message-count-bubble-text
Chat Interface Components
Parts related to the main chat window, header, and message container.app-parentchat-box-parent,chat-boxchat-header,chat-header-avatar,chat-header-vendor-badge,chat-header-empty,chat-header-title,chat-header-subtitle,chat-header-menu-buttonmessage-list-container,message-list-loading-container,message-list-scrollable-containermessage-bodypowered-by-remark-container,powered-by-remark-link,powered-by-remark-text
Message Components
Parts related to individual messages within the chat.chat-message-container,chat-message-container-flexbox,chat-message-container-inner,chat-message-timestamp,chat-message-ai-generated-textchat-event-container,chat-event-emoji,chat-event-text,chat-event-additional-infoog-container,og-container-inner,og-video,og-image,og-title,og-price,og-loading-containernps-emoji-container,nps-emoji-button,nps-option-button
Expert Profile Components
Parts related to expert profiles, their display, and interaction.expert-profile-container,expert-profile-name,expert-profile-bio,expert-profile-wide-photo,view-expert-profile-linkexpert-profile-avatar-parent,expert-profile-avatar,expert-profile-avatar-loadingexpert-profile-fullscreen-parent,expert-profile-fullscreen-carousel-item,expert-profile-fullscreen-carousel-item-image,expert-profile-fullscreen-carousel-item-image-loading,expert-profile-fullscreen-carousel-item-image-blurredexpert-matched-message-parent,expert-matched-message-summary-title,expert-matched-message-summarymatched-expert-pills-parent,matched-expert-pill,matched-expert-pill icon,matched-expert-pill-textwork-experience-label,work-experience-item,work-experience-item-title,work-experience-item-description
Introduction and Onboarding Components
Parts related to the introduction sequence and user onboarding flow.introduction-message-parent,introduction-message-avatar-parent,introduction-message-name,introduction-message-vetted,introduction-message-need-help,introduction-message-chat-button,introduction-message-chat-button-textPII-collection-steps-count,email-collection-input,email-collection-input-count,email-collection-input-submit,email-collection-input-skipterms-of-service-text,terms-of-service-link,customer-support-link
Loading and Status Indicators
Parts related to loading states, waiting indicators, and status displays.loading-messages-spin,loading-messages-spin-svgwaiting-for-pairing-container,waiting-for-pairing-ai-overlay,waiting-for-pairing-ai-overlay-title,waiting-for-pairing-ai-overlay-message,waiting-for-pairing-ripple,waiting-for-pairing-brand-logo,waiting-for-pairing-experttyping-indicator-container,typing-indicator-dotonline-indicatorai-persona-indicator-container,ai-persona-indicator-persona-chatting-with,ai-persona-indicator-beta-badge,ai-persona-indicator-menu-button
Recommendation Components
Parts related to product recommendations and recommendation carousels.recommendation-parent,recommendation-innerrecommendation-carousel-container,recommendation-carousel-item,recommendation-carousel-item-imagerecommendation-image-container,recommendation-imagerecommendation-link,recommendation-pricerecommendation-variant,recommendation-variant-separatorrecommendation-loading,recommendation-loading-container,recommendation-loading-title,recommendation-loading-price
Icons
Parts related to icons used in the chat widget.close icon,wave icon,sparkles icon,transparent-speech-bubble icon,vertical-ellipsis icon,vetted-expert icon
UI Building Blocks
Common UI elements used throughout the application for consistent styling.avatar-container,avatar-image,avatar-initials-container,avatar-initials-textslide-buttontooltip-containerwave-dividerai-chat-transfer-inline-messagechat-divider
2.2. Targeting Parts in Your CSS
To override the default styling for any of these parts, use the ::part() selector. For example:3. Putting It All Together: A Full Example
Below is an example of how you might override both the CSS variables and part styles in your project:4. Best Practices
- Use Variables First: Because most styling is based on CSS custom properties, try to override the variables on the remark-qa-activator element first. This maintains consistency and leverages the built-in theming.
- Minimize !important: Although the examples above use !important to ensure your styles take precedence, use this sparingly and only when necessary.
- Test Responsiveness: Some parts of the activator (like button layout or input widths) may be responsive. Check your overrides on multiple screen sizes.
- Dynamic Styling: If your application logic needs to show or hide parts (for example, toggling the expert header), consider using inline styles or CSS classes in combination with the
::part()selectors.