Skip to main content

Team chat Pro

A workspace chat, as Slack and Teams lay it out. The sidebar lists channels (# or a lock for private ones) and direct messages with faces and presence, bold when unread and with a red count when you're mentioned. The open channel shows its topic and members, and messages as plain rows: the avatar and name head each run, day dividers, a red New messages line, reactions as chips that toggle yours, and threads as faces and "3 replies · Last reply 5 min ago". Open a thread and its replies sit in a panel beside the channel, with Also send to #design. Hover a message on the web for quick reactions, Reply in thread and its menu; on phones, long-press it. Start a huddle from the header and a green bar keeps its clock, mute and Leave. On phones the sidebar, the channel and the thread are pushed one after another.

It's built from ChannelThread and free components, so every part is yours to change.

import { TeamChatScreen } from '@patine-ui/pro';

<TeamChatScreen />;
Loading…
<View style={{ width: '100%', height: 680 }}>
  <TeamChatScreen />
</View>

Make it yours​

The demo reads TEAM_CHANNELS, teamMessages(now) and teamReplies(now), and useTeamChat stands in for your backend: replying in a thread moves its parent's summary on, and Maya answers. Copy the screen and swap the hook for your API and socket.

PropTypeDefault
nownumber: pins the demo's clock, for tests and screenshotsDate.now()

Built with​

The free components, from patine-ui:

Avatar · AvatarGroup · Button · Checkbox · EmptyState · Text

And from Patine Pro:

Files​

team-chat/
├── components/
│ ├── ChannelHeader.tsx
│ └── ChannelSidebar.tsx
├── hooks/
│ └── useTeamChat.ts
├── index.ts
├── team-chat.constants.ts
└── TeamChatScreen.tsx

A look at the code​

The open channel: its header and the huddle bar, from TeamChatScreen.tsx:

const main = channel ? (
<View style={{ flex: 1 }}>
<ChannelHeader channel={channel} onBack={desktop ? undefined : s.back} onHuddle={s.huddle ? undefined : s.startHuddle} />
{s.huddle ? (
<HuddleBar
title={`Huddle in ${prefix}${s.channels.find((c) => c.id === s.huddle?.channel)?.name ?? ''}`}
seconds={s.huddle.seconds}
muted={s.huddle.muted}
people={[TEAM_ME, 'maya', 'leo']}
onToggleMute={s.toggleHuddleMute}
onLeave={s.leaveHuddle}
/>
) : null}
{/* … the thread, then the replies panel */}
Get the source with Pro
  • Messenger: ChannelThread, MessengerThread, ConversationList, MessengerComposer and ChatDetails.
  • Notification center: mentions and activity across channels.