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

BulkActionBar

  • Stable
  • WCAG 2.2 evidence
  • RTL

The bar that appears over a table while rows are selected: a checkbox and the selection count, an optional "Select all", the bulk actions, and a button that clears the selection. Render it only while at least one row is selected. It is a React Aria Toolbar (role="toolbar"): Tab enters it once and the arrow keys move between its controls, mirrored in right-to-left layouts (WCAG 2.1.1, 4.1.2). The count is announced through React Aria's polite live region when the bar appears and whenever the text changes, so screen reader users learn about the selection without moving focus (4.1.3); the visible text is not itself a live region, so it is not read twice. The checkbox is named by the count and shows the mixed or checked state with a dash or a tick, not colour (1.4.1); every button keeps its own focus ring (2.4.7) and 32 px height (2.5.8). Consumer duties: the wording of the count and actions, confirming destructive actions, moving focus sensibly after an action removes the selected rows, and scroll-padding on a scroller when the bar is fixed over it (2.4.11).

import { BulkActionBar } from "@nexera-ui/react";
Loading example…
6
examples
10
props
2
live controls
1
platform
11
WCAG criteria
1
block uses 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…
isAllSelected
children
Generated code
import { BulkActionBar } from "@nexera-ui/react";

<BulkActionBar />

Examples 5

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

All selected

Every row selected (isAllSelected): the checkbox shows a tick and "Select all" is not needed.

Loading example…

With table

With a Table: the bar is rendered only while rows are selected, at the bottom of the viewport (sticky). Select rows with the checkboxes (or Space) and listen to the polite announcement; "Clear selection" removes the bar.

Loading example…

Narrow container

At 20 rem the parts wrap onto several lines and the bar keeps inside its container.

Loading example…

Long content

Long and translated text wraps instead of truncating.

Loading example…

Right to left

Right-to-left: the checkbox sits at the start (right), the clear button at the end (left), and arrow keys mirror.

Loading example…

Props 10

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

10 props shown

selection*Nexera
string

The selection count as a sentence. It is shown, it names the checkbox, and it is announced politely whenever it changes and when the bar appears (WCAG 4.1.3). Format it for your locale ("3 von 128 ausgewaehlt"); keep it free of markup.

Default –
isAllSelectedNexera
boolean

Every row is selected: the checkbox shows checked instead of the Figma indeterminate dash.

Default false
onClearSelection*Nexera
() => void

Called when the checkbox or the "Clear selection" button is pressed. The bar should disappear once nothing is selected.

Default –
onSelectAllNexera
() => void

Called by the "Select all" button, which shows when this is provided. Offer it while only some rows are selected, for example when the table is paged.

Default –
selectAllLabelNexera
string

Text of the "Select all" button; put the total in it ("Select all 128") so the effect is clear. Translate it.

Default Select all
clearSelectionLabelNexera
string

Accessible name of the "Clear selection" icon button. Translate it.

Default Clear selection
aria-labelNexera
string

Accessible name of the toolbar. Translate it.

Default Bulk actions
childrenNexera
ReactNode

The actions for the selected rows. Arrow keys move between them. Keep destructive actions confirmable.

Default –
classNameNexera
string

Extra classes, merged last so they win over the defaults.

Default –
aria-describedbyReact Aria
string

Identifies the element (or elements) that describes the object.

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

7 direct · 4 supporting
  • 1.3.1Info and RelationshipsLevel A · tested directly
  • 1.3.2Meaningful SequenceLevel A · tested directly
  • 1.4.1Use of ColorLevel A · tested directly
  • 1.4.10ReflowLevel AA · supporting test
  • 1.4.12Text SpacingLevel AA · supporting test
  • 2.1.1KeyboardLevel A · tested directly
  • 2.4.3Focus OrderLevel A · tested directly
  • 2.4.7Focus VisibleLevel AA · supporting test
  • 2.5.8Target Size (Minimum)Level AA · supporting test
  • 4.1.2Name, Role, ValueLevel A · tested directly
  • 4.1.3Status MessagesLevel AA · 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:.

  • data-disabled
  • data-hovered
  • data-pressed
Usage
<BulkActionBar className="data-disabled:opacity-90 shadow-sm" />

Used in blocks

Related components