Skip to content

Custom CSS

How to style the widget with your own CSS, with the full list of class names and variables you can rely on.

When themes and colors aren't enough, you can write your own CSS for the widget. You'll find the Custom CSS field on the Widget screen, in the Advanced section. It is available on the Advanced personalization level, which comes with the Professional plan. The Widget personalization article explains what each plan includes.

How your CSS is applied

The widget runs in its own isolated part of the page. Your CSS is applied only inside the widget, so it can't change anything else on your site, and your site's own stylesheets don't reach into the widget either.

Styles are applied in this order, and each step overrides the one before:

  1. the theme,
  2. the primary color and the text color on primary,
  3. advanced colors set for individual elements,
  4. your custom CSS.

Your CSS is added last, and the theme and the advanced colors are written so they never outrank it. Any rule of yours with at least one class selector, such as .fibly-header or .fibly-root, wins over the theme and over the advanced colors. You don't need longer selectors to beat a theme.

The live preview on the settings page applies your CSS as you type, so you can check the result before saving.

Limits

  • The CSS can be at most 20 KB.
  • @import is not allowed. To change the typeface, use the Font setting instead.
  • The CSS can't contain a closing </style> tag.

The dashboard shows an error and won't save CSS that breaks one of these rules.

Class names

Every main element of the widget carries a class starting with fibly-. Use these classes in your selectors rather than other class names you might find in the page source, which can change at any time.

ClassElement
.fibly-launcherThe chat button shown on your page when the widget is collapsed.
.fibly-launcher-iconThe icon or image inside the chat button.
.fibly-panelThe open chat window as a whole.
.fibly-headerThe header bar at the top of the chat window.
.fibly-header-titleThe chat window title inside the header.
.fibly-avatarThe icon or avatar image in the header.
.fibly-header-actionsThe group of buttons on the right side of the header.
.fibly-messagesThe scrolling area that holds the conversation.
.fibly-messageEvery message row in the conversation.
.fibly-message--botA message from the bot.
.fibly-message--customerA message from the visitor.
.fibly-message--agentA message from a member of your team.
.fibly-message--eventA conversation event, such as a team member joining, shown as centered text.
.fibly-bubbleThe bubble that holds the text of a bot, visitor or team message.
.fibly-typingThe indicator shown while a reply is being written.
.fibly-composerThe area at the bottom with the message field and the send button.
.fibly-inputThe message field.
.fibly-sendThe send button.
.fibly-footerThe "Powered by Fibly AI" line. It isn't rendered when the footer is hidden.
.fibly-alertEvery notice shown inside the conversation.
.fibly-welcome-noticeThe welcome notice you set in Widget settings, shown at the start of each conversation.
.fibly-alert-boxThe colored box inside a notice, with its icon and text.
.fibly-alert--infoThe box of an informational notice.
.fibly-alert--warningThe box of a warning notice.
.fibly-sales-popupThe speech bubble that can appear next to the collapsed chat button.

Some elements carry more than one class:

  • The typing indicator is displayed as a bot message, so it has .fibly-message--bot as well as .fibly-typing. A rule for .fibly-message--bot also changes the typing indicator. To leave it out, use .fibly-message--bot:not(.fibly-typing).
  • The welcome notice is also a notice, so it has both .fibly-welcome-notice and .fibly-alert. Other notices have only .fibly-alert, even when they appear before the visitor's first message. In conversations that started before this class was introduced, the welcome notice has only .fibly-alert.

Variables

Colors, corners and shadows are defined as CSS variables. Changing a variable is often simpler than overriding individual rules, because every element that uses it changes at once. The defaults below are the values of the Default theme; other themes change some of them.

VariableWhat it controlsDefault
--fibly-fontThe typeface of all text in the widget.the system font
--fibly-surfaceThe background of the chat window.#ffffff
--fibly-panel-bgThe background of the conversation area and the footer.#f9fafb
--fibly-header-bgThe header background.your primary color
--fibly-header-textThe header text and icons.your text color on primary
--fibly-bot-bubble-bgThe background of bot and team messages.#ffffff
--fibly-bot-bubble-textThe text of bot and team messages.#374151
--fibly-bot-bubble-borderThe border of bot and team messages.#f3f4f6
--fibly-customer-bubble-bgThe background of the visitor's messages.your primary color
--fibly-customer-bubble-textThe text of the visitor's messages.your text color on primary
--fibly-input-bgThe background of the message field.transparent
--fibly-input-textThe text in the message field.inherit
--fibly-linkLinks inside messages.blue
--fibly-muted-textSecondary text, such as the footer and conversation events.#9ca3af
--fibly-border-colorThe border of the chat window and the lines above and below the message field.#e5e7eb
--fibly-border-widthThe width of the chat window's border.1px
--fibly-radiusThe corner rounding of the chat window.8px
--fibly-bubble-radiusThe corner rounding of message bubbles.8px
--fibly-control-radiusThe corner rounding of the message field and the send button.6px
--fibly-launcher-radiusThe corner rounding of the chat button. Not set by default: the button is then slightly rounded when it shows text and round when it shows only an icon. A value you set applies to both.not set
--fibly-shadowThe shadow of the chat window.a soft, large shadow
--fibly-bubble-shadowThe shadow of message bubbles.a very light shadow
--fibly-launcher-shadowThe shadow of the chat button.a soft shadow
--fibly-alert-info-bgThe background of informational notices.#eff6ff
--fibly-alert-info-borderThe border of informational notices.#bfdbfe
--fibly-alert-info-textThe text and icon of informational notices.#1d4ed8
--fibly-alert-warning-bgThe background of warnings.#fffbeb
--fibly-alert-warning-borderThe border of warnings.#fde68a
--fibly-alert-warning-textThe text and icon of warnings.#b45309
--fibly-alert-radiusThe corner rounding of notices.the same as --fibly-bubble-radius
--fibly-alert-border-widthThe width of the border of notices.1px
--fibly-alert-shadowThe shadow of notices.none

Set variables on .fibly-root to change them for the whole widget. A value you set there wins over the theme and over the advanced colors. To change a variable in one place only, set it on that element instead, for example on .fibly-panel for the chat window or on .fibly-launcher for the chat button.

Examples

A larger header title

.fibly-header-title {
  font-size: 18px;
  font-weight: 600;
}

Square message bubbles

.fibly-root {
  --fibly-bubble-radius: 0;
}

This changes the bubbles of the bot, the visitor and your team at once. To square only the visitor's messages, target them directly:

.fibly-message--customer .fibly-bubble {
  border-radius: 0;
}
.fibly-root {
  --fibly-link: #0b7a53;
}

If you only want to change the link color, the Links field in Advanced colors does the same without any CSS.

Stable class names and variables

The classes and variables listed on this page are a fixed part of the widget, and we keep them working when the widget changes. If we ever need to rename or remove one, we'll announce it in advance so you have time to update your CSS. Other class names that appear in the page source are internal and can change without notice, so don't rely on them.

After a plan change

If you move to a plan without the Advanced level, your CSS stays saved but isn't applied on your site. It is applied again as soon as you return to a plan that includes it.