Theme studio

Design a theme, preview it live, then export it. Saved in this browser.

Quick picks #10b981
Generated scale
50100200300400500600700800900
Some text is below AA

ChatHeader

  • Stable
  • WCAG 2.2 evidence
  • RTL

The top bar of a conversation: avatar, the name as a heading, a status line and actions such as Search and More. Accessibility: the name is a heading (WCAG 1.3.1, 2.4.6) and the status is text (1.4.1); the avatar is decorative (1.1.1); text wraps instead of truncating (1.4.10, 1.4.12); colours meet 4.5:1 in Light and Dark (1.4.3). Logical layout, so it mirrors in right-to-left. It is not a landmark: put it inside the conversation's section or main. Presentational: renders in React Server Components; the actions are client islands. Consumer duties: translated, specific aria-labels on the icon buttons (and a Tooltip with the same text); a heading level that fits the page; use a top app bar for page headers on mobile.

import { ChatHeader } from "@nexera-ui/react";
Loading example…
5
examples
5
props
0
live controls
1
platform
7
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.

Loading…
Generated code
import { ChatHeader } from "@nexera-ui/react";

<ChatHeader />

Examples 4

The same examples as Storybook, rendered live. Open Code to copy one.

With menu

The More button opens a Menu.

Loading example…

Long content

A long name and status wrap; the actions keep their place.

Loading example…

Right to left

Right-to-left: the avatar is on the right, the actions on the left.

Loading example…

Full HR helpdesk

Loading example…

Props 5

5 props shown

name*Nexera
ReactNode

The person or channel the conversation is with. Rendered as a heading so the conversation can be found by heading navigation (WCAG 1.3.1, 2.4.6). Wraps; never truncated.

Default –
statusNexera
ReactNode

Secondary line: role, availability or member count. Write availability here as text: the avatar's presence dot is colour only (WCAG 1.4.1).

Default –
avatarNexera
ReactNode

Avatar: pass <Avatar size="md" isDecorative presence={<Presence isDecorative />}... />. Decorative because the name and the status text are next to it.

Default –
actionsNexera
ReactNode

Actions at the inline end: pass named icon buttons, for example <IconButton variant="ghost" aria-label="Search in conversation" icon={<IconSearch />} /> and a Menu trigger. They are client components; the header itself stays a server component.

Default –
headingLevelNexera
1 | 2 | 3 | 4 | 5 | 6

Heading level of the name. Choose the level that fits the page outline (for example 2 under the page's h1).

Default 2

* 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

5 direct · 2 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.12Text SpacingLevel AA · supporting test
  • 2.1.1KeyboardLevel A · tested directly
  • 2.4.6Headings and LabelsLevel AA · tested directly
  • 4.1.2Name, Role, ValueLevel A · tested directly

Fits any width.

Nexera components respond to the space they are given. Drag the corner of the frame, or pick a width.

0 px · drag the corner

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:.

Usage
<ChatHeader className="shadow-sm" />

Used in blocks

Related components