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

SidebarSectionLabel

  • Stable
  • WCAG 2.2 evidence
  • RTL

Heading text of a group of sidebar items. Presentational: renders in React Server Components and reads the enclosing Sidebar's variant and collapsed state from CSS, not from React context. In the collapsed rail the text is visually hidden and a 32 px divider is drawn instead. Accessibility: on its own it is plain text. Use SidebarSection label="…" to group items: the section is a group named by this label, so screen readers announce the grouping that the label shows visually (WCAG 1.3.1). Consumer duty: short, unique section names.

import { SidebarSectionLabel } from "@nexera-ui/react";
Loading example…
4
examples
2
props
2
live controls
1
platform
3
WCAG criteria
0
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
variant
Generated code
import { SidebarSectionLabel } from "@nexera-ui/react";

<SidebarSectionLabel />

Examples 3

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

In section

Usual use through SidebarSection, which makes a group named by the label. Expanded and collapsed: in the rail the label becomes a divider and stays the group's name.

Loading example…

Long label

Long section names wrap.

Loading example…

Right to left

Right to left.

Loading example…

Props 2

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

2 props shown

label*Nexera
ReactNode

Section name, a short noun such as "Reports". It wraps instead of truncating.

Default –
variantNexera
"brand" | "light"

Colour scheme. When omitted the label follows the enclosing Sidebar (Brand outside one).

Default the enclosing Sidebar's variant, else "brand"

* 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 · 1 supporting
  • 1.3.1Info and RelationshipsLevel A · tested directly
  • 1.4.12Text SpacingLevel AA · supporting test
  • 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
<SidebarSectionLabel className="shadow-sm" />

Used in blocks

No block uses SidebarSectionLabel yet.

Related components