
Boost ops efficiency, drive revenue, & save big with omnichannel messaging
Customize React Chat Timestamps and Likes with Sendbird UIKit



Boost ops efficiency, drive revenue, & save big with omnichannel messaging

Boost ops efficiency, drive revenue, & save big with omnichannel messaging
This recipe shows seconds in message timestamps and customizes how an existing Like reaction is displayed in Sendbird UIKit for React. UIKit still renders the sender, message body, and timestamp.
Timestamp format. Set
DATE_FORMAT__MESSAGE_CREATED_ATtoHH:mm:ssinSendbirdProvider’sstringSet.Like reaction. Use
MessageContent.renderEmojiReactionsto customize the reaction button.
Local Chromium tests verified the UI at desktop and mobile widths using synthetic data. Reaction sync and persistence still need to be checked in a connected Sendbird test app.
Change the time format and reuse UIKit's reaction callback
Set the timestamp format
Merge DATE_FORMAT__MESSAGE_CREATED_AT: 'HH:mm:ss' into your existing stringSet on SendbirdProvider. UIKit uses this format for its built-in timestamp throughout that provider. Consecutive messages from the same sender can split into separate groups when their timestamps fall in different seconds, even if the other grouping conditions match.
This example illustrates wiring for an existing app. The sample uses secondsFormat from timestamp-format.ts and ChannelWithMessageDetails.
import SendbirdProvider from '@sendbird/uikit-react/SendbirdProvider';
import GroupChannel from '@sendbird/uikit-react/GroupChannel';
<SendbirdProvider
appId={appId}
userId={userId}
accessToken={accessToken}
stringSet={{ ...existingStrings, DATE_FORMAT__MESSAGE_CREATED_AT: 'HH:mm:ss' }}
>
<GroupChannel
channelUrl={channelUrl}
renderMessageContent={(props) => <MessageWithLikeButton {...props} />}
/>
</SendbirdProvider>Customize the Like button
Build the heart in MessageContent.renderEmojiReactions. Read Reaction.count and Reaction.hasCurrentUserReacted to handle a sampled member list. Use the reaction key registered in your app.
import EmojiReactions, { type EmojiReactionsProps } from '@sendbird/uikit-react/ui/EmojiReactions';
import MessageContent, { type MessageContentProps } from '@sendbird/uikit-react/ui/MessageContent';
import { useLocalization } from '@sendbird/uikit-react/hooks/useLocalization';
import './reaction.css';
function LikeReaction(props: EmojiReactionsProps) {
const { stringSet } = useLocalization();
const { message, toggleReaction } = props;
const [reaction] = message.reactions;
if (!toggleReaction || reaction?.key !== 'like' || message.reactions.length !== 1) {
return <EmojiReactions {...props} />;
}
const selected = reaction.hasCurrentUserReacted;
return (
<div className="recipe-reaction-strip">
<button type="button" className="recipe-reaction-chip" aria-pressed={selected}
aria-label={`${stringSet.FEEDBACK_LIKE} ${reaction.count}`}
onMouseDown={event => event.stopPropagation()}
onTouchStart={event => event.stopPropagation()}
onClick={() => toggleReaction(message, reaction.key, selected)}>
<span aria-hidden="true">♥</span> {reaction.count}
</button>
</div>
);
}
export function MessageWithLikeButton(props: MessageContentProps) {
return <MessageContent {...props} renderEmojiReactions={reactionProps => <LikeReaction {...reactionProps} />} />;
}Copy reaction.css from the linked recipe. The custom button appears when like is the message’s only reaction key and UIKit supplies toggleReaction. For messages with no reactions, a different reaction key, multiple keys, or no callback, the sample uses UIKit’s default EmojiReactions component. When reactions are enabled, users add the first reaction through the default UI. The custom button shows the count and lets users add or remove their Like. Use UIKit’s default reaction component when you need the reaction picker or participant details. Group channel customization · Reactions · Text localization
Check the count with a mouse and keyboard
Use Node.js 20.19 or a later 20.x release, or Node.js 22.12 or later. The commands below check out the exact revision in the Timestamp & Like sample README. Run them in a directory where you can create sendbird-uikit-react.
git init sendbird-uikit-react
cd sendbird-uikit-react
git fetch --depth=1 https://github.com/sendbird/sendbird-uikit-react.git 0d0e9f49c45451ab9e429b42caf1171358c68bb4
git checkout --detach FETCH_HEAD
cd samples/customization-recipes
npm ci
npm run devOpen http://127.0.0.1:5173/message-timestamp-and-reaction/ while Vite is running. The sample uses local test data. Turn on Custom message details, then click the heart to raise the count from 2 to 3. With the button focused, press Space to remove your Like and Enter to add it again. The fixture uses the browser’s time zone. In UTC, enabling the customization changes 12:34 to 12:34:56.
The linked recipe uses React 19.3.1, Sendbird UIKit for React 3.20.1, and Sendbird Chat SDK 4.22.17. The original fixture capture used Node 26.12.1 and npm 11.20.0.
HH:mm format shows Alex, the original text, and 12:34. UIKit 3.20.1 uses p by default, which can display a local time such as 12:34 PM.The browser checks also covered the pressed state, a long message at 390px, and the stock badges when a second reaction type was present. The local fixture captured calls to add and remove the Like.

| Requirement | How it was checked | Observed result | Checked by |
|---|---|---|---|
| Timestamp and stock body stay in place | Open the same synthetic message before and after enabling the customization | The time changes from 12:34 to 12:34:56 in the same element | Chromium at 1280 px and 390 px |
| Like count and keyboard use | Click or press Enter and Space in the fixture | The count moves between 2 and 3. The fixture records add and remove calls. | Chromium at both widths |
| Sampled reacting members | With the local demo running, open http://127.0.0.1:5173/message-timestamp-and-reaction/?wrapper&sampled and click the selected Like 20 button. | The button shows Like 19 and is unselected. The fixture records deleteReaction. | Chromium at both widths |
The screenshots, clip, and first two rows of the table document the original fixture. The sampled-member check used a synthetic reaction summary in the revised recipe.
Optional agent setup for Claude Code or Codex
Install the Sendbird Client Plugin if you want your coding agent to help apply the UIKit changes. Use the Sendbird CLI plugin if you want the agent to run CLI checks against a connected test app.
claude plugin marketplace add sendbird/sendbird-plugins
claude plugin install sendbird-cli@sendbird
claude plugin install sendbird-client@sendbirdcodex plugin marketplace add sendbird/sendbird-plugins
codex plugin add sendbird-cli@sendbird
codex plugin add sendbird-client@sendbirdFind the official Sendbird plugins for Claude Code and Codex in the Sendbird Plugin Marketplace on GitHub.
Start a new coding-agent session after installation. For connected checks with the CLI plugin, follow its setup guide to sign in and select your test app. The Sendbird CLI and Plugins overview explains what each tool does.
In an existing UIKit app, invoke the Client Plugin’s /sendbird-client:ui-customize skill.
Ask Claude Code to apply the timestamp and Like changes
In my existing React UIKit group channel, show timestamps as HH:mm:ss and
display a heart with the count for messages whose sole reaction type is Like.
Keep the existing sender, body, and localization overrides. Use the public
reaction callback and a native button with a pressed state. Keep the default
reaction UI for every other reaction combination. Check click, Enter, and
Space at desktop and 390px widths with synthetic data, and report what
would still need a connected Sendbird test app.The read-only setup check loaded Sendbird Client Plugin 1.0.7 and the Sendbird CLI plugin 0.6.1 in a fresh Claude Code session and identified the fixture entry point. This suggested prompt was not used to produce the sample.
Verify the Like in a connected test app
Install Sendbird CLI (@sendbird/cli) from npm. Sendbird CLI 0.6.1 requires Node.js 22.23.4 or later in the 22.x line, or 24.22.1 or later in the 24.x line. Follow the sign-in steps in the Sendbird CLI Quickstart. Set the app, channel, message, and user variables for your authorized test app. Choose a test user who belongs to the group channel and already has a valid Sendbird access token. Run chat message get to confirm that this user can retrieve the target message and check its sender.
sendbird --json chat message get --type group \
--app-id "$TEST_APP_ID" --id "$TEST_CHANNEL_URL" --message-id "$TEST_MESSAGE_ID" --as-user "$TEST_CHAT_USER"Enable Reactions for the test app in Sendbird Dashboard and register the like reaction key. Use a test group channel with two authorized members. Open the same message in both signed-in sessions. Add and remove the Like, then check the other session and reload to verify cross-client updates and persistence. These connected checks are pending. We checked the lookup against @sendbird/cli 0.6.1 command metadata without running it against a live app. CLI message lookup · UIKit Reactions setup · Add Chat with the Client plugin
Your app still owns authentication, server-side token issuance and channel membership. Keep those in your existing service.








