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

BadgeGroup

  • Stable
  • WCAG 2.2 evidence
  • RTL

A pill that pairs a small badge with a short message, for an announcement or a status line. It is plain text by default, so a screen reader reads "New Payroll v2 is live"; with href the whole group is one native link. The arrow is decorative and flips in right-to-left. Meaning never depends on the tone: the words say it (WCAG 1.4.1). Presentational: renders in React Server Components, without React Aria. Consumer duties: write the badge and message so they make sense together and say the status in words ("Payroll v2 is live", not only a green pill); keep link text meaningful out of context; for a plain status use Badge.

import { BadgeGroup } from "@nexera-ui/react";
Loading example…
6
examples
7
props
2
live controls
1
platform
10
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…
tone
size
Generated code
import { BadgeGroup } from "@nexera-ui/react";

<BadgeGroup />

Examples 5

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

Arrow slot

The arrow is the Figma Show arrow: shown by default, null hides it, any node replaces it. It flips in right-to-left.

Loading example…

Status in words

The tone supports the words: the status is written out, never only coloured.

Loading example…

Long message

A long message wraps in a narrow container instead of being cut off; the pill grows taller.

Loading example…

Right to left

Right-to-left: a Leading group keeps the badge at the start (right) and the arrow points left, after the message.

Loading example…

Props 7

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

7 props shown

badge*Nexera
ReactNode

The text of the small badge: one or two words that label the message ("New", "Update", "Beta").

Default –
message*Nexera
ReactNode

The message: a short announcement. It wraps, it is never cut off. Write the meaning in words: the tone only supports it (WCAG 1.4.1).

Default –
arrowNexera
ReactNode

The arrow. Shown by default, as in the Figma default variant: an arrow after the message in a Leading group and after the badge label in a Trailing group, flipped in right-to-left. Pass another icon to replace it (decorative: hidden from assistive technology; wrap a directional icon in DirectionalIcon), or null to hide it, which suits a group that is not a link.

Default an arrow pointing to the inline end
typeNexera
"leading" | "trailing"

Where the badge sits: leading puts it before the message and the arrow after the message, trailing puts it after the message with the arrow inside the badge ("Read more").

Default "leading"
toneNexera
"brand" | "neutral" | "success" | "warning" | "danger"

Colour set.

Default "brand"
sizeNexera
"md" | "lg"

Padding and type: 32 px or 38 px tall with a one-line message.

Default "md"
hrefNexera
string

Not set: the group is plain text, not a link. Where the announcement leads. The whole group becomes a native link (<a>) with a hover underline on the message and the shared keyboard focus ring; its name is the badge text followed by the message. For client-side routing, pass the onClick of your router or render your own link around a static group.

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

5 direct · 5 supporting
  • 1.1.1Non-text ContentLevel A · tested directly
  • 1.3.1Info and RelationshipsLevel A · tested directly
  • 1.3.2Meaningful SequenceLevel A · supporting test
  • 1.4.1Use of ColorLevel A · supporting test
  • 1.4.10ReflowLevel AA · supporting test
  • 1.4.12Text SpacingLevel AA · supporting test
  • 2.1.1KeyboardLevel A · tested directly
  • 2.4.4Link Purpose (In Context)Level A · tested directly
  • 2.4.7Focus VisibleLevel 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
<BadgeGroup className="shadow-sm" />

Used in blocks

No block uses BadgeGroup yet.

Related components