Skip to content
Zuno UI
Explore components
EXPLORE
Actions
Forms
Layout
Navigation
Data display
Feedback
Overlays
RESOURCES
Components/BulkActionsBar

BulkActionsBar

The selected count, a way to clear the selection and the actions that apply to every selected item.

4 invoices
InvoiceCustomerAmount
INV-1042Northwind$1,250.00
INV-1043Globex$860.00
INV-1044Initech$2,400.00
INV-1045Umbrella$310.00

Installation

Run it from the root of a project already set up with zunoui init.

npx zunoui@latest add bulk-actions-bar

Dependencies

What add bulk-actions-bar installs alongside the component. The CLI skips any you already have in a compatible version.

ZUNO registry

Examples

2 examples · 1 component
bulk-actions-bar
4 invoices
InvoiceCustomerAmount
INV-1042Northwind$1,250.00
INV-1043Globex$860.00
INV-1044Initech$2,400.00
INV-1045Umbrella$310.00

Selection in a table

Select rows to show the bar; Archive removes them and Clear selection returns focus to the select-all checkbox.

bulk-actions-bar
3 of 12 files selected

Count with context

label adds the total; the same text is announced.

API reference

Configured through props: pass the selected count and the clear handler, and the actions as children.

PropTypeDefault
count

How many items are selected. At 0 the bar is not rendered.

number—
onClear

Clears the selection. Move focus back to a sensible place, such as the select-all checkbox.

() => void—
children

The bulk actions, usually small Buttons.

ReactNode—
label

The count text, also announced. Use it for "3 of 24 selected" or for translations.

(count: number) => ReactNodecount => `${count} selected`
clearLabel

Text of the clear button.

ReactNode"Clear selection"
aria-label

Names the group of actions.

string"Bulk actions"

States

The states that apply to this component and their visual treatment.

StateTreatment
Emptycount is 0: nothing visible, the status region is empty.
SelectedThe count, the actions and Clear selection; the count is announced.
ClearedonClear runs and the bar is removed; focus goes where onClear puts it.

Accessibility

The count is announced through a role="status" region that stays mounted outside the bar, so screen readers hear "3 selected" as the selection changes, even when the bar first appears.

The bar is a labelled role="group" ("Bulk actions") and does not take focus when it appears: the user keeps working on the checkboxes and reaches the actions with Tab.

Clearing the selection removes the bar, so its button disappears. Return focus in onClear, for example to the select-all checkbox.

Place it right before the table in the DOM, so Tab reaches the actions before the rows. Give it the space of your toolbar (render the toolbar only while count is 0, in a slot of the same height) or make it sticky, so the rows don't move under the pointer when it appears. Keep BulkActionsBar itself mounted: unmounting it also removes the region that announces the count.

Confirm destructive actions, for example with ConfirmAction, and say how many items they affect.