ValyroUI Русская версия

Bulk Action Bar

Actions for selected rows, with keyboard shortcuts. Pro · Data and metrics › Tables

Floating toolbar for actions on selected rows: animates in when the selection starts, shows the count, primary actions with shortcut hints, an overflow menu and a clear button. A WAI-ARIA toolbar: one Tab stop, arrow keys move between controls.

Installation

npx valyro-cli@latest login
npx valyro-cli@latest add bulk-action-bar
npm install valyro-ui-pro

import 'valyro-ui-pro/styles.css';
import { BulkActionBar } from 'valyro-ui-pro';

Props

PropTypeDefault
count *numberNumber of selected items; the bar shows while it is above zero.
totalnumberItems available, for "3 of 120" and the Select all button.
actions *BulkAction[]Shown as buttons up to maxVisible; the rest go into the ⋯ menu.
maxVisiblenumber3Buttons before the overflow menu. Default 3.
onClearSelection *() => voidClears the selection: the ✕ button and the Escape key.
onSelectAll() => voidAdds "Select all {total}" while only part is selected.
position'sticky' | 'fixed' | 'static''sticky'sticky (default) floats at the bottom of the scroll container the bar is placed in, e.g. right after a table; fixed floats at the bottom of the viewport; static stays in the flow where it is placed and takes its own height (embedded in a panel, a card or a docs example).
shortcutsbooleantrueKeyboard shortcuts of the actions and Escape to clear. Default true.
shortcutScopeRefObject<HTMLElement | null>Area whose focus turns the shortcuts on, usually the table the selection belongs to. They also work from the bar itself and while nothing has focus; elsewhere on the page the keys do what they normally do.
localestringBCP 47 locale for numbers and dates; defaults to the ThemeProvider's, then the browser's.
animation'default' | 'spring''default'spring: the selected count rolls to each new value (up as it grows, down as it shrinks). default: it just changes.
labelsPartial<BulkActionBarLabels>Overrides for the built-in English text; keys left out keep their defaults.

Related components

Previous: Virtual List · Next: List Block · All Data and metrics