System Message
- Stable
- WCAG 2.2 evidence
- RTL
An event in a conversation that nobody wrote, such as someone joining or a channel being renamed: a small muted pill with an optional icon. The text carries the meaning, so nothing depends on the icon or colour (WCAG 1.1.1, 1.4.1); text/muted on bg/sunken
meets 4.5:1 in Light and Dark (1.4.3). It is static content, not a live region: render the conversation as a
role="log" list so new events are announced with the messages (4.1.3). Presentational: renders in React Server
Components. Consumer duties: wording; centring it in the conversation (for example self-center in a flex column); use Alert
for errors.
import { SystemMessage } from "@nexera-ui/react";- 4
- examples
- 2
- props
- 1
- live controls
- 1
- platform
- 5
- WCAG criteria
- 3
- blocks use it
Try every prop. Copy the code.
Change the props and the code updates. Check light and dark, LTR and RTL, and phone width.
import { SystemMessage } from "@nexera-ui/react";
<SystemMessage />Examples 3
The same examples as Storybook, rendered live. Open Code to copy one.
In conversation
Centred between messages in a conversation; the icon is optional.
import { SystemMessage } from "@nexera-ui/react";
import { LuUserPlus, LuUserX } from "react-icons/lu";
export function InConversation() {
return (
<div role="log" aria-label="Conversation" className="flex max-w-xl flex-col gap-3">
<p className="m-0 text-body-default text-primary">Welcome to the people team channel.</p>
<SystemMessage icon={<LuUserPlus />} className="self-center">
Hina Raza joined #people-ops
</SystemMessage>
<SystemMessage icon={<LuUserX />} className="self-center">
Bilal Ahmed left #people-ops
</SystemMessage>
<SystemMessage className="self-center">Channel renamed to #people</SystemMessage>
</div>
);
}
Long text
Long text wraps inside the pill instead of truncating.
import { SystemMessage } from "@nexera-ui/react";
import { LuUserPlus } from "react-icons/lu";
<div className="max-w-xs">
<SystemMessage icon={<LuUserPlus />}>
Hina Raza added Ayesha Khan, Bilal Ahmed and Sara Malik to #people-ops-and-employee-experience
</SystemMessage>
</div>;
Right to left
Right-to-left: the icon moves to the right.
import { SystemMessage } from "@nexera-ui/react";
import { LuUserPlus } from "react-icons/lu";
<SystemMessage icon={<LuUserPlus />}>انضمت هناء رضا إلى القناة</SystemMessage>;
Props 2
Press "Try it" on a card to load that prop into the playground.
2 props shown
children*NexeraReactNodeWhat happened. Say it in words: the icon is decorative. Wraps; never truncated.
iconNexeraReactNodeIcon before the text, 12 px, for example <IconUserPlus /> for someone joining. Shown when
provided; decorative (hidden from assistive technology).
* Required. React Aria props shown are the ones most apps use; the component accepts the rest of its React Aria props too.
Accessible by default.
Built on React Aria, and covered by the WCAG 2.2 evidence generated on every build.
WCAG 2.2 evidence
2 direct · 3 supporting- 1.1.1Non-text ContentLevel A · tested directly
- 1.3.1Info and RelationshipsLevel A · tested directly
- 1.4.10ReflowLevel AA · supporting test
- 1.4.11Non-text ContrastLevel AA · supporting test
- 1.4.12Text SpacingLevel AA · supporting test
Fits any width.
Nexera components respond to the space they are given. Drag the corner of the frame, or pick a width.
Styling hooks
Pass className to add Tailwind classes (merged last). State is exposed as data attributes, so you can style it with variants like data-pressed:.
<SystemMessage className="shadow-sm" />Used in blocks
- ChatMessaging and collaboration
- Helpdesk assistantMessaging and collaboration
- Day separators and system notesMessaging and collaboration
Related components
- ChatHeaderThe top bar of a conversation: avatar, the name as a heading, a status line and actions such as Search and More.
- ComposerThe message box under a conversation: a growing textarea with attach, emoji and voice buttons, a Send button, a "replying to" bar, attachments and a voice recording row.
- ConversationItemOne conversation in a list: avatar, name, time, the last message and an unread count.
- DateSeparatorMarks where a new day starts in a conversation: a label between two lines.
- MessageBubbleOne chat message: `Direction` (incoming, outgoing) x `Type` (text, reply, file, image) x `Group` (single, continued), with sender name and avatar, time, an edited mark and read ticks.
- ReactionA reaction under a message, such as a thumbs up, that the user can add or remove.
- TypingIndicatorShows that someone is writing a reply: three dots in a bubble and a short text.