FiveM Docs
Core Resources

esx_chat_theme

esx_chat_theme for ESX Legacy explained. What the ESX chat theme changes, how it hooks into the cfx chat resource, and how to customize or remove it.

esx_chat_theme is a visual theme for the default FiveM chat resource. It gives chat messages the GTA-style Chalet font with a drop shadow and removes the chat window background. It contains no Lua code and no API; it is a pure style add-on you can keep, edit or remove.

Overview

Resourceesx_chat_theme
SideClient (NUI styles for chat)
DependenciesThe cfx chat resource (not declared in the manifest)
ConfigNone, edit style.css
RequiredNo
Gamecommon

How it works

The cfx chat resource scans running resources for a chat_theme entry in their fxmanifest.lua and loads the listed files into the chat page. esx_chat_theme registers a theme named esx:

fxmanifest.lua
chat_theme 'esx' {
    styleSheet = 'style.css',
    script = 'shadow.js',
    msgTemplates = {
        default = '<b>{0}</b><span>{1}</span>'
    }
}
PartPurpose
style.cssFonts (Font2, Font2_cond loaded from runtime.fivem.net), transparent .chat-window, message size and spacing
shadow.jsInjects an SVG drop shadow filter (#svgDropShadowFilter) that .msg uses for readable text on any background
msgTemplates.defaultRenders the author ({0}) in bold followed by the message ({1})

Customization

Change the look in style.css. The .msg rule controls most of it:

style.css
.msg {
    font-family: Font2, sans-serif;
    color: #ffffff;
    font-size: calc(1.7vh);
    filter: url(#svgDropShadowFilter);
    line-height: calc(2.7vh * 1.2);
    margin-bottom: 0;
}

The font files are loaded from runtime.fivem.net at runtime. If that host is unreachable, the chat falls back to sans-serif.

Install order

Start chat before the theme. The official recipe starts chat first and the theme as part of [core]:

server.cfg
ensure chat
ensure oxmysql
ensure esx_lib
ensure es_extended
ensure [core]

Common issues

  • Theme has no effect. The chat resource is not running, or you use a third-party chat that ignores chat_theme entries.
  • Styles clash with another theme. Several chat_theme resources can be active at once and their CSS stacks. Stop the one you do not want.

Frequently asked questions

Independent documentation

esx-fivem.com is a community project and is not affiliated with the ESX Framework team. Facts on this page were checked against the upstream source. Official resources: docs.esx-framework.org and github.com/esx-framework.
Edit on GitHub

Last updated on

On this page