appearance option sets how the Moss widget looks: colors, fonts, the chat window’s layout and position, the header, input bar, footer, guide controls, the start screen and the messages shown when Moss can’t answer. This page is the full reference for it.
The most common change is a brand color, a header title and the highlight color for guides:
chrome.title shows only when chrome.header is set, even as {}. Without chrome.header, the widget keeps its original header, which has no title. This applies to a Header title saved in the dashboard too: set chrome.header in your code, or turn on Show status dot or choose a New chat icon in the dashboard.How an appearance is built
appearance takes a preset name or an object.
How an object merges:
- Key by key. Each key you set replaces that one value. Every key you leave out keeps the preset’s value.
- Arrays replace. A list, such as
zeroState.suggestedQueriesor a fallback’sctas, replaces the preset’s list whole. nullandundefinedchange nothing. You can’t blank a token; set it to the value you want instead.- CSS variables work in values. A value such as
'var(--brand-primary)'or'var(--brand-primary, #0F766E)'is read from your page’s root element (:root) when Moss builds the appearance. If the variable isn’t defined there and has no fallback, the preset’s value is used.
'12px', '0.75rem'). Spacing and radius tokens are in px. Text sizes are in rem, so the widget’s text scales with your page’s root font size.
The SDK also exports mergeAppearance(base, overrides), which deep-merges overrides onto a complete MossAppearance object you hold.
Where values come from
Your code, the dashboard and the preset can all set the same key. Which one shows depends on the kind of value and on how Moss is installed.
An admin sets these keys under Configure > Appearance:
A few more theme and branding keys can be saved for the application through the API, with no field in these forms:
colors.primary, colors.primaryLight, colors.primaryLighter, shadows.sm, shadows.lg, chrome.header.statusDotColor, chrome.header.newChatStyle and chrome.inputBar.placeholder. Once saved, they are applied the same way and win over your code.
A field left blank in the dashboard leaves your value or the preset’s in place. To let your code decide a key that the dashboard has a field for, clear that field.
The zero state is under Content > Suggested Content. See Suggested content for the dashboard side.
When dashboard values arrive
- npm package: theme, branding and zero state arrive with the chat session, when the chat first opens on a page or when a page loads with a session to resume. Until then, the widget shows the preset and your values, so a first open can change look a moment after it appears. A dashboard change reaches a user at their next page load or new chat.
- CDN script: the script reads the application’s settings once as it loads, and the session brings theme, branding and zero state again as above.
window.mossSettings is merged shallowly: an appearance object there replaces the dashboard’s whole appearance object, including its layout and fallbackStates. Theme, branding and zero state from the dashboard still arrive with the session.
When a setting doesn’t show
A key at the wrong level is ignored, with no error or console warning. For example,appearance.title does nothing; the title is appearance.chrome.title. To check a setting that has no effect:
-
Let TypeScript check the keys. An object literal written inside the
configprop is checked against the SDK’s types, and an unknown key is a compile error. If you build the appearance as a separate variable, type it so the check still runs: -
Check the SDK version. With
logLevelatLogLevel.INFO(the default) orLogLevel.DEBUG, the browser console shows[MossSDK] v0.17.0 initializedwhen Moss mounts. A key added in 0.17.0 does nothing on an older SDK. - Check the dashboard. For the theme and branding keys listed above, a saved dashboard value wins over yours.
-
Check the companion key.
chrome.titleneedschrome.header, thestreamActivityoption needschrome.loader: 'steps', andchrome.guide.minimizehas no effect in a docked layout. -
Check for a saved position. Moss keeps the window’s position and size for the browser tab, so a new
modal.defaultPositionormodal.defaultSizeshows in a new tab, or after Reset Chat Position in the original header. See What the user can do.
Page CSS can’t style the widget
The chat window renders inside a shadow root that Moss adds to your page. Your page’s stylesheets don’t apply inside it, and Moss sets its styles inline from the appearance. Useappearance for every visual change.
Two components render in your page’s own DOM instead, where your CSS does apply: AssistantButton and FloatingActionBar.
Presets
The two presets share the type scale, spacing, radius and shadows. They differ in these values:Tokens
Colors
colors.highlight takes a hex color, #RGB or #RRGGBB; Moss derives the translucent fill from it. It is read once, when AgentProvider mounts, so a change needs a remount. It can’t be set from the dashboard.
colors.categoryTitle, effects.glassOpacity, progressBar.height, typography.lineHeight.lg and spacing['2xl'] are kept for compatibility and have no visible effect in 0.17.0.
Typography
The
rem defaults are designed for a 12px root font size, where they give 10, 12, 14 and 24px text. On a page with a 16px root, the same values give larger text; set the sizes in px if you need exact sizes.
Custom fonts. Browsers don’t load @font-face rules declared inside a shadow root, so set fontFaceUrl to a stylesheet that declares your font, and name the font in fontFamily:
<link rel="stylesheet"> with that URL to your page’s <head>, once per URL, and never removes it. If your Content Security Policy blocks the stylesheet, the next font in fontFamily is used.
Spacing, radius and shadows
Effects and input area
The chat window
Floating or docked
layout chooses between a floating window and a panel docked to one edge of the browser window.
mode is required when you set layout.
modal.defaultPosition, modal.defaultSize and any position passed to openChat().
Default position and size
modal sets where the floating window first opens and how big it is.
right and bottom keeps its distance from the bottom-right corner when the browser window is resized.
What the user can do
- Move: drag the header, or an empty part of the message list or input area. Buttons don’t start a drag.
- Resize: drag the left, right or bottom edge, or a bottom corner. The top edge doesn’t resize. There is no visible handle.
- Minimum size: 360 × 400 px.
- Stays inside the browser window. A window that fits keeps its size and moves inside. One that doesn’t fit shrinks to the window less 20 px on each side, but not below its minimum size.
- Reset: the original header has a Reset Chat Position button that puts the window back at
modal.defaultPositionandmodal.defaultSize. The header you get withchrome.headerhas no reset button.
modal.defaultPosition or modal.defaultSize therefore shows in a new tab, or after Reset Chat Position, not on a reload of a tab where Moss already loaded.
When Moss highlights an element, the floating window steps aside from it. When it can’t, a strip says “Highlighted item is behind this panel.” with a Move panel action.
Opening at a position from code
openChat(position) and toggleChat(position) from useAgent() take an optional position for that one open: { x, y, width, height }, in CSS pixels from the top-left corner of the browser window.
- The position applies to that open only and isn’t saved. The next open without a position puts the window back where it was.
- Moss keeps the window inside the browser window, as above.
- If the user moves, resizes or resets the window during that open, their placement is kept.
- If the chat is already open, the position is ignored.
- A docked layout ignores it.
AssistantButtonanddata-moss-triggerelements open with no position.
Minimizing during a guide
From 0.17.0,chrome.guide.minimize: true lets the user minimize the floating window while a guide runs, so it stops covering the page. See Guide offer and guide below.
Native modal dialogs
A<dialog> opened with showModal() sits above every other element on the page, including Moss. See Native modal dialogs.
Chrome
chrome groups the parts of the widget around the conversation. Every key is optional, except that chrome.footer.enabled is required once you set chrome.footer.
Header
With
newChatStyle: 'outline', the pill uses colors.primary, or the header’s text color when colors.primary has less than 4.5:1 contrast with colors.headerBackground. Where the label would leave the title less than 120px, the button shows the icon alone.
The header with a title has no Reset Chat Position button and no language menu.
Input bar
Footer
The footer is a strip under the input with up to two links. It is off unlessenabled is true.
enabled is required when you set chrome.footer.
A LinkConfig is { label: string, url: string, icon?: ... }. Links open in a new tab.
icon is 'external-link', 'ticket', 'none', or your own React element, such as an inline SVG, which is shown as decoration and hidden from screen readers. The help center icon follows its label; the ticket icon comes before it. Unset, the help center link shows ”↗” and the ticket link shows no icon. An element can be set only in your code: an icon name saved in the dashboard replaces it.
Support ticket card
chrome.ticketCard changes the copy on the card Moss shows when it drafts a support ticket. Every field is a plain string shown to all users whatever their language; leave a field unset to keep the translated default.
See Support ticket handoff for how filing works.
Answers
Guide offer and guide
These keys change how a guide is offered and how a running guide looks. Guides and navigation explains the guide itself.pageTint. The chat panel never dims, and clicks still reach the page. The tint stays up while Moss works on the next step and lifts on a step with nothing highlighted. Give color as an opaque color: its alpha would multiply with opacity.
targetBadges. With 'within-step', a step with several targets numbers them 1, 2, 3, and a single target has no badge. With 'step', the badge shows the guide’s step number, as in the guide bar: once on a group of targets, and on each of several scattered targets, which are options for the same step. 'step' also asks Moss to name several targets in words instead of numbering them 1, 2, 3.
nextBesideInput and nextInBar. With nextInBar: false, the guide bar shows only the plan and its progress, and Next sits beside the input on every step where the bar would have shown it. With both set to false there is no Next at all, and a development build logs a warning.
minimize. The header gets a Minimize button, and the “Highlighted item is behind this panel.” strip gets a Minimize action. A minimized window shows only its header and the guide bar, with Next in the bar even under nextInBar: false. It keeps its width and the edge it is anchored to, steps aside from highlights, and can be dragged. These bring the full window back:
- the header’s Expand button;
openChat(),toggleChat()or adata-moss-triggerelement;- the guide ending;
- a card in the chat that needs an answer, such as a rating or a ticket draft.
closeChat() closes it. Floating windows only: a docked panel has no Minimize.
Start screen
The start screen is what the chat shows before the first message: recent chats, suggested questions and recommended articles. Its content comes fromzeroState; these keys set its look.
recentChats can hide the list but can’t turn it on. The list shows only when the application lets users reopen earlier chats; see Earlier chats.
Feedback
From 0.17.0. Both keys are off when unset.
With
'stars', 4 and 5 count as helpful and 1 and 2 as not helpful.
A reason the user picks after a thumbs-down reaches your onEvent handler on Moss Feedback Given; the comment never does. The session rating, thumbs or stars, isn’t sent to onEvent: it is stored with the session and shown in the dashboard under Sessions, in the list and in the session’s details.
Attachments (beta)
From 0.17.0. Beta: may change.
Users can attach PDF, PNG and JPEG files, up to 5 per message and 10 MB each. A file is uploaded to your Moss deployment’s attachment storage and kept with the session. The model never reads it: only a step the user confirms, whose API action or MCP tool takes a file, receives it. Unset or
false, there is no attach button and nothing is uploaded.
Zero state
zeroState is the content of the start screen: suggested questions and recommended articles.
icon is 'document', 'compass', 'megaphone', 'search' or 'people'.
Your code or the dashboard. If you set appearance.zeroState at all, even as {}, it is used whole and the dashboard’s suggested content is not shown. Leave it unset to use the content saved under Content > Suggested Content. See Suggested content.
Per page and per role
The dashboard holds one set of suggested content for the whole application. To show different content on different pages, or to admins and to other users, setvariants in your code and pass pageKey:
pageKeyis a stable name you choose for the page, such as'billing-settings'; it is not a URL. Pass a new value when the user moves to another page, and the start screen updates.- Role:
userMetadata.roleequal to'admin'(in any letter case) selectsadmin. Anything else, or no role, selectscustomer. - Which set shows: the entry for
pageKey, else thedefaultentry, else the top-levelsuggestedQueriesandrecommendedArticles. A page entry wins even if it only has content for the other role. - Topping up: when the chosen set has fewer than 3 questions, or fewer than 3 articles, Moss adds items from the other role’s set at the same level, then from the top-level lists, until there are 3. A set with more than 3 is never cut.
suggestedQueryIconsis read from the top level only; set it there, not inside a variant.
Fallback states
fallbackStates replaces two of Moss’s built-in messages with your own copy and links.
unavailable, a connection failure shows Moss’s built-in error message.
With the npm package, the fallback states saved under Content > Suggested Content in the dashboard are not applied. Set them in your code.
What’s new in 0.17.0
chrome.header.newChatStylechrome.guide.minimizechrome.startScreen.recentChatschrome.feedback(askWhatWentWrong,sessionRating)chrome.attachments(beta)- The
AgentProvideroptionstreamActivity, which adds live steps tochrome.loader: 'steps' - The New chat button and the default header title read “New AI chat” (previously “New chat”).
Common questions
I set a title or a color and nothing changed. Check that the key is at the right level (chrome.title, not title) and that chrome.header is set. Then check the dashboard: a saved Branding or Theme value wins over yours. See When a setting doesn’t show.
Can I style the widget with my own CSS?
No. The chat renders in a shadow root, so page CSS doesn’t reach it. Use appearance. Only AssistantButton and FloatingActionBar render in your page’s DOM.
How do I change the red outline on highlighted elements?
Set appearance.colors.highlight to a hex color.
How do I make the text bigger?
Set appearance.typography.fontSize (and lineHeight). The defaults are rem, so they also follow your page’s root font size.
Can users resize or move the chat window?
Yes, in the floating layout: drag the header to move it, and the left, right or bottom edge or a bottom corner to resize it, down to 360 × 400 px. See The chat window.
The chat opens too tall for some screens.
Set modal.defaultSize.height. Moss also shrinks a window that doesn’t fit the browser window, keeping 20 px from each edge.
The chat shows under our modal dialog.
A <dialog> opened with showModal() sits above everything else on the page. Mount Moss in its own element and call installModalDialogEscape(); see Native modal dialogs.
How do we collect more feedback than thumbs up and down?
From 0.17.0, set chrome.feedback.askWhatWentWrong: true to ask for a reason after a thumbs-down, and chrome.feedback.sessionRating: 'stars' for a 1 to 5 session rating. See Feedback.
How do I show different suggested questions on different pages?
Pass pageKey and set appearance.zeroState.variants in your code. The dashboard holds one set for the whole application. See Per page and per role.
I edited suggested questions in the dashboard and the widget still shows the old ones.
Your code sets appearance.zeroState, which replaces the dashboard’s content whole. Remove it from your code to use the dashboard’s.
Related
- Guides and navigation
- Events and errors
- Configuration overview: where each kind of setting is read from
- Types