Skip to main content

CSS Class Reference

These are the selectors a chat room's markup carries on purpose, for you to target from the Custom CSS box. They are grouped here by the part of the room they belong to.

The same list is in the product: on a room's Customize tab, the CSS Class Guide button at the top right of the Pre-built Themes panel opens it in tabs, with a copy button beside every selector.

Before you write a rule

Add !important when you are overriding something. Colours, fonts and sizes set on the Customize tab are written straight onto the elements, and the room's own styling is served after your stylesheet, so a plain rule loses to both. Custom CSS versus the Customize fields explains when you need it and when you do not.

Use a field if one exists. Anything in the Appearance Reference or the Hide Elements Reference is better set there: validated input, and a loadCustomization key so you can vary it per embed instead of per room.

Only target what is on this page. Plenty of other class names are visible in a browser inspector and are not safe to write rules against — see Selectors to leave alone at the bottom.

Layout and structure

The shell the rest of the room hangs off.

SelectorWhat it targets
.wrapperThe outermost container. It lays out the sidebar, header, message area and composer, so this is where you set an overall radius, shadow or clipping.
.chat-headerThe bar across the top of the chat area.
.sidebarThe sidebar as shown on a wide screen.
.mobileSidebarThe same sidebar as a full-screen overlay on a narrow screen.
#chat-container-parentThe scrolling pane the message list sits in. Use it for the pane's border or background rather than the list's own padding.
.chat-containerThe message list itself. Inherited properties set here — most usefully font-family — reach every message.
.input-areaThe composer row along the bottom.
Custom CSS
.wrapper {
border-radius: 12px !important;
overflow: hidden !important;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
}
SelectorWhat it targets
.chat-headerThe bar itself — background, height, bottom border, padding.
#mobileMenuButtonThe menu button that opens the sidebar overlay. It also appears on a wide screen when the sidebar is collapsed.
.mobileMenuNotificationThe unread badge on that button.
.brandLogoThe logo image in the header. Present only on rooms configured with your own branding.
Custom CSS
.chat-header {
background-color: #101828 !important;
border-bottom: none !important;
}

.brandLogo {
max-height: 40px !important;
object-fit: contain !important;
}
SelectorWhat it targets
.sidebarThe wide-screen sidebar: width, background, padding.
.mobileSidebarThe narrow-screen overlay version.
.profile-sectionThe signed-in visitor's avatar and name block at the top of the sidebar.
.editProfileButtonsThe claim-profile and edit-profile buttons in that block.
.channelsHeadingThe Channels heading.
.channelsListThe container holding the channel rows.
.channelsItemOne channel row, wide-screen sidebar.
.channelsListItemOne channel row, narrow-screen overlay.
.activeChannelAdded to whichever channel row is open, in either sidebar.
.privateChatsHeadingThe Private Chats heading.
.privateChatsListThe container holding the conversation rows, narrow-screen overlay.
.privateChatsItemOne conversation row, wide-screen sidebar.
.privateChatItemOne conversation row, narrow-screen overlay.
.onlineUsersHeadingThe Online users heading.
.onlineUsersCountThe count shown beside that heading.
.onlineUsersListThe container holding the user rows.
.onlineUsersListItemOne user row.
.online-userThe name text inside a user row or a conversation row.
.moderatorUsernameSidebarAdded to the row of a user who is a moderator, so you can mark them out.
.loadMoreButtonThe Load More button under a long user list.
.bannedUsersButtonThe Banned Users button. Moderators only.
.logoutButtonThe Logout button.
The sidebar exists twice

A room renders both sidebars and shows whichever suits the width, and the channel and conversation rows have different class names in each. To restyle a row everywhere, write both selectors:

Custom CSS
.channelsItem,
.channelsListItem {
padding: 8px 12px !important;
border-radius: 6px !important;
}

Headings, the online-users list and its rows share their names across both, so they only need one rule.

Message list

SelectorWhat it targets
#chat-container-parentThe scrolling pane.
.chat-containerThe list inside it.
.chat-messageEvery message row. Set the rhythm of the list here — padding, margins, row radius.
.chat-message:hoverThe hover state of a row.

The hover colour is also available as the custom property --chat-message-hover-bg, which is what the Chat Message Hover Color field sets. Reading it keeps a custom hover rule in step with the field:

Custom CSS
.chat-message:hover {
background-color: var(--chat-message-hover-bg, #f8f8f8) !important;
}

A single message

SelectorWhat it targets
.chat-messageThe whole row: avatar column, name, timestamp, body, reactions.
.message-usernameThe sender's name above the message.
.moderatorUsernameAdded to that name when the sender is a moderator.
.moderatorMessageAdded to the whole row when the sender is a moderator.
.message-timestampThe time shown beside the name.
.profilePicContainerThe avatar column of a message.
.profile-avatarThe initials avatar drawn for a user with no picture of their own. A user who has uploaded a picture gets a plain image instead, which you reach as .profilePicContainer img — style both if you are adding a border or changing the size.
.repliedToMessageMessageThe quoted text of the message being replied to, shown above a reply and in the composer while the reply is being written.
.message-unapprovedA visitor's own message while it is waiting for approval in a pre-moderated room.
.likeReactionContainerThe reactions strip under a message.
.likeReactionButtonThe button that opens the reaction picker.
.emojiReactionOne reaction tag with its count.
.waveReaction, .thumbsUpReaction, .clapReaction, .heartReactionThe individual buttons inside the reaction picker.
Custom CSS
.message-username {
color: #6366f1 !important;
font-weight: 700 !important;
}

.message-timestamp {
font-size: 11px !important;
color: #9ca3af !important;
}

.moderatorMessage {
border-left: 3px solid #6366f1 !important;
}
Two rows in the in-product guide are labels, not selectors

The CSS Class Guide lists the sender's name as .username and the time as .timestamp; the class names actually on those elements are .message-username and .message-timestamp, as above. Use these.

Composer

SelectorWhat it targets
.input-areaThe whole composer row — background, top border, padding.
.textarea-divThe frame around the message input and its buttons: border, radius, fill.
.textarea-div textareaThe message input itself — font, size, line height, inner padding. It also carries the id #messageTextArea if you prefer to target it directly.
.emojiButtonThe emoji picker trigger. The same class is also on the reaction picker under a message, so scope it with .input-area if you only mean the composer one.
.input-area .button.is-successThe send button.
Scope the send button

The send button is identified by a pair of general-purpose classes that other buttons in the room also use. Always qualify it with .input-area, or you will restyle buttons elsewhere:

Custom CSS
.input-area .button.is-success {
border-radius: 8px !important;
padding: 10px 20px !important;
}

Modals

The room's dialogs share one shell — joining, the room password prompt, editing or claiming a profile, a private conversation, the banned-users list, the list of who reacted — so these selectors restyle all of them together.

SelectorWhat it targets
.modal-cardThe dialog box: width, radius, shadow.
.modal-card-headIts title bar.
.modal-card-titleThe title text in that bar.
.modal-card-bodyThe content area.
.modal-card-footThe footer, which holds the action buttons.
.modal-backgroundThe dimmed overlay behind the dialog.
Custom CSS
.modal-card {
border-radius: 12px !important;
max-width: 500px !important;
}

.modal-background {
background-color: rgba(0, 0, 0, 0.6) !important;
backdrop-filter: blur(4px) !important;
}

Modal appearance fields exist too — Modal Background Color, Modal Font Color, Modal Font, Modal Heading Font Size and Modal Label Font Size — see the Appearance Reference.

Chat bubble

The floating bubble and its close bar are a layer outside the chat room, so the Custom CSS box does not reach them. There are no selectors to target. Style the bubble with the four Customize fields instead:

FieldWhat it colours
Chat Bubble ColorThe circular launcher.
Chat Bubble Icon ColorThe icon inside the launcher.
Chat Bubble Header Background ColorThe close bar above the open chat.
Chat Bubble Header Text ColorThe text and icon in that bar.

Open the bubble and the chat inside it is an ordinary chat room, so every selector on this page applies there as usual.

Layout modes

When the header or the sidebar is hidden, the room re-lays itself out and the outer container picks up an extra class. Target these if you need to adjust a layout for one of those arrangements — most often to reclaim padding the missing region used to provide.

SelectorApplied when
.hide-header-mode-wrapper-classThe header is hidden.
.hide-sidebar-mode-wrapper-classThe sidebar is hidden.
.hide-sidebar-and-header-mode-wrapper-classBoth are hidden — the minimal embed.
.collpase-sidebar-mode-wrapper-classThe sidebar is collapsed rather than hidden. Note the spelling of the class name.
Custom CSS
.hide-sidebar-and-header-mode-wrapper-class {
padding-left: 20px !important;
}

These depend on the Hide Header, Hide Sidebar and Collapse Sidebar settings, whether they come from the Customize tab or from loadCustomization, so a rule written against one of them only takes effect in that arrangement.

Special states

SelectorWhat it targets
.chatOffThe full-area overlay shown while the room is switched off.
.chatOffMessageThe message text inside that overlay.
.message-unapprovedA visitor's own message awaiting approval in a pre-moderated room.
Custom CSS
.chatOff {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

.chatOffMessage {
color: #ffffff !important;
font-size: 28px !important;
max-width: 400px !important;
}

Selectors to leave alone

Ids on individual messages. Every message row also carries an id of its own so the room can scroll to it. Those ids belong to one message and will never match again.

Anything with a generated data-v-… attribute. Rules in the room's own stylesheet are qualified with attributes of that shape. They are produced when the chat client is built and change from one release to the next, so a rule that copies one will stop matching.

Bare utility classes. .button, .columns, .tag, .column, and names beginning is- or has- are general-purpose and appear all over the interface. A rule on one of them on its own will hit parts of the room you were not aiming at. Qualify them with a region from this page — .input-area .button.is-success, .chat-message .columns — or use the specific class instead.

Carrying over an older stylesheet

If you have rules written against an earlier version of this list:

In your old CSSUse instead
.hintsNothing matches it. Hide the formatting hint row with the Markdown Suggestions toggle — see the Hide Elements Reference.
.invite-buttonNothing matches it. Delete the rule.
#messageTextAre#messageTextArea, or .textarea-div textarea.
.Sidebar.sidebar. Class names are case-sensitive, so the capitalised form never matched.
.username, .timestamp.message-username, .message-timestamp.