# Bulk actions

Bulk actions apply one action, such as approve, send a reminder or archive, to every row people have selected in a list. The bar that offers them should say how many rows the action will really touch, because some selected rows may not qualify. Meadowstack's `BulkBar` floats at the bottom of the screen with that count and the actions the person may take.

Checked 2 December 2026. By Bohuslav Poláček. https://meadowstack.com/glossary/bulk-actions/

*The kit's BulkBar: it shows only with a selection, floats over the table instead of pushing it, and leads with the count and an optional total.*

From `packages/kit/src/components/data-table.tsx` in the Meadowstack repository:

```tsx
export function BulkBar({
  count,
  onClear,
  summary,
  children,
}: {
  count: number;
  onClear: () => void;
  /**
   * What the selection adds up to, after the count in a quieter weight
   * ("2 180 Kč", "14 h"): apps used a loose span for it (17 Oct 2026).
   */
  summary?: ReactNode;
  children: ReactNode;
}) {
  const strings = useKitStrings();
  if (count === 0) return null;
  return (
    <div
      role="region"
      aria-label={strings.actions}
      data-kit-bulkbar=""
      className="fixed bottom-4 left-1/2 z-40 flex w-max max-w-[calc(100vw-1.5rem)] -translate-x-1/2 animate-rise-in items-center gap-1 rounded-xl bg-surface-inverse p-1 pl-3 text-sm text-fg-inverse shadow-lg dark:hairline dark:border-border-strong dark:bg-surface-raised dark:text-fg touch:gap-2"
    >
      {/* Announced by DataTable's own live region, which exists before the bar does. */}
      <span className="mr-2 font-medium whitespace-nowrap tabular">
        {strings.selected(count)}
```

## Why it matters in a business app

Month end: forty supplier invoices to approve, twelve overdue customers to remind. One action per row is forty dialogs. Bulk actions turn it into select, check, act.

The risk is acting on rows people did not mean. Five invoices are selected, but one client has reminders turned off: a button that says "Send reminders" leaves the person guessing what happened to the fifth. "Send 4 reminders of 5" says it before the click.

## How Meadowstack handles it

- **Every row keeps its checkbox slot**, so selecting never shifts the columns, and ticking never changes a row's height. The whole 40px checkbox cell is the [target](https://meadowstack.com/glossary/target-size/).
- **The count is in the button.** AGENTS.md: bulk actions say how many rows they apply to. The kit's demo reminders read "Send 4 reminders of 5" when one selected client cannot be reminded.
- **A floating bar.** `BulkBar` appears only with a selection, at the bottom of the screen, so the table does not jump; a `summary` can add what the selection adds up to, such as hours or a total.
- **Announced.** `DataTable`'s live region tells screen readers how many rows are selected.
- **Allowed actions only.** Actions the role cannot take are hidden, not disabled; irreversible ones go through a confirm, and a bulk change that can be put back offers [undo](https://meadowstack.com/glossary/undo/).

The component page is [BulkBar](https://meadowstack.com/components/bulk-bar/).

## Common mistakes

- **A toolbar that appears above the table.** Every row moves down by its height the moment the first box is ticked.
- **"Select all" that means every page.** Say whether it is the 25 rows on screen or all 312 that match.
- **One failure stops the batch.** Report which rows did not go through and why, and keep the rest done.

## Questions

### Where should bulk actions appear?

Close to the selection without moving it. Meadowstack floats the bar at the bottom of the screen, so the table and the rows people just ticked stay where they were.

### What if some selected rows cannot take the action?

Say so in the action's label, such as 4 of 5, and act only on the ones that qualify. The person sees the difference before clicking, not after.

### Should bulk delete ask for confirmation?

Yes, when it cannot be undone. Name the number of records in the confirmation, so nobody deletes 312 rows believing it was 12.

## Related

- [A document inbox that catches a changed bank account](https://meadowstack.com/screens/document-inbox/) (Screens)
- [A packaging quote that works out its price as you type](https://meadowstack.com/screens/quote-form/) (Screens)
- [A print shop's jobs on one board, from enquiry to dispatch](https://meadowstack.com/screens/print-job-pipeline/) (Screens)
- [BulkBar: what to do with the selection](https://meadowstack.com/components/bulk-bar/) (Components)
- [The work queue screen](https://meadowstack.com/patterns/work-queue/) (Patterns)
- [Internal tool](https://meadowstack.com/glossary/internal-tool/) (Glossary)
