Making Flarum Messages Feel More Like Chat

While maintaining my Flarum forum, I keep coming back to small details: the space between message bubbles, the input area on a phone, and where the send button sits. Each change is small, but these are parts of the forum I use repeatedly.

The adjustments started in Flarum’s Custom CSS field. I have now collected them into an extension that can be installed, updated, and enabled a section at a time: Message Chat Enhancement.

The extension is publicly available, so I wanted to share what it does and why I made it.

It started with custom CSS

Custom CSS is a convenient place to make a quick adjustment. As the changes grew to cover messages, discussion lists, editors, and theme colors, keeping everything in one field became harder to maintain.

I wanted separate switches. Someone who only wants the messaging changes should be able to enable those. Someone who likes their existing colors should be able to keep them. An adjustment that does not suit a particular site should be easy to turn off.

The extension organizes these changes into 11 independently controlled groups in the Flarum admin panel. All switches are off on a fresh installation, so you can choose where to start.

The feature I wanted most: a reply box that stays in the conversation

The main addition is a persistent inline reply box for private messages.

With it enabled, users who have permission to reply can open a conversation and type directly at the bottom. After a message is sent, the input area stays in place, ready for the next reply.

Unsent text is temporarily retained when switching conversations within the current page. If sending fails, the text remains available to retry. This is in-page draft retention; drafts are not saved across a page refresh or after closing the page.

Around that reply box, I have also organized the conversation layout: two columns for the conversation list and messages on desktop, and a single-column view on phones. Separate style groups adjust message bubbles, avatars, timestamps, images, and videos.

The experience I am aiming for is simple: open a conversation, read the messages, and reply right there.

Recovering a little space on phones

Version v0.1.3 fixes two mobile layout issues.

The send button was inheriting styles intended for a control in Flarum’s top navigation, which gave it the wrong dimensions. The conversation area also reserved a fixed amount of vertical space, leaving an unnecessary gap below the reply box.

The mobile send button now has a 44px height and sits on the right of the toolbar. The conversation uses the available page height while respecting space reserved by the theme for bottom navigation.

I checked the changes at phone viewport widths of 320, 390, and 430px, as well as with a taller input area and without bottom navigation. On a small screen, recovering room for a few more messages makes a useful difference.

A few other forum adjustments

The extension also includes optional styles for mobile discussion content, discussion lists, board directories, and user profiles, along with layout changes for the discussion and reply composers.

There is also a “Warm Paper Colors and Portal” group covering warm paper and vermilion colors, light, dark, and high-contrast variants, and some portal, navigation, and shared controls.

Each group can be enabled separately. The theme color changes in “Warm Paper Colors and Portal” require Masthead to be installed and enabled. Melon is optional.

If messaging is all you need, you can start with the four messaging groups.

Installation and updates

The release described here is v0.1.3. It requires PHP 8.3 or later, Flarum 2.0.2 or later within the 2.x series, and the official Messages extension 2.0.2 or later within the 2.x series. The work is based on my Flarum 2.0.2 and Messages 2.0.2 setup; other theme and extension combinations still need checking on their own sites.

For a new installation, run these commands from your Flarum root directory:

composer config repositories.message-chat-enhancement vcs https://github.com/vatebur/flarum-message-chat-enhancement.git
composer require vatebur/flarum-message-chat-enhancement:^0.1.3
php flarum cache:clear

Enable Message Chat Enhancement in the admin panel, select the groups you want, save the settings, and refresh the forum.

For an existing installation:

composer update vatebur/flarum-message-chat-enhancement --with-all-dependencies
php flarum cache:clear

If you already have custom CSS covering the same areas, back it up before removing overlapping rules. Those rules can override the extension or keep styles active even after a switch is turned off.

A small project from running my own forum

This extension grew out of specific things I wanted to improve on my own site. Publishing it gives those scattered adjustments a home, and hopefully saves other Flarum Messages users some time working through the same details.

If you try it, feedback with your theme name, relevant extension versions, and screenshots would be helpful. Mobile layouts in particular can behave differently as navigation, editors, and themes are combined.