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

DateSeparator

  • Stable
  • WCAG 2.2 evidence
  • RTL

Marks where a new day starts in a conversation: a label between two lines. The lines are decorative (aria-hidden); the label is text in the reading order (WCAG 1.3.1), never truncated (1.4.10, 1.4.12), in text/muted (contrast audited in Light and Dark; 1.4.3). Logical layout, so it mirrors in right-to-left. Presentational: renders in React Server Components. Consumer duties: format the date for the locale; use it between messages, not on every message.

import { DateSeparator } from "@nexera-ui/react";
Loading example…
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.

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

<DateSeparator />

Examples 3

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

In conversation

Between messages, with a machine-readable date for a formatted label.

Loading example…

Long label

A long label wraps; the lines shrink but stay visible.

Loading example…

Right to left

Right-to-left: the layout mirrors.

Loading example…

Props 2

Press "Try it" on a card to load that prop into the playground.

2 props shown

label*Nexera
ReactNode

The day the following messages belong to, already formatted for the reader's locale, for example "Today", "Yesterday" or "12 Mar 2026" (format with Intl.DateTimeFormat or @internationalized/date). It is read as text, so screen reader users hear where a new day starts.

Default –
dateTimeNexera
string

Machine-readable date of label (ISO 8601, for example 2026-03-12). When set, the label is a <time> element.

Default –

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

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
<DateSeparator className="shadow-sm" />

Used in blocks

Related components