# BulkBar: what to do with the selection

BulkBar appears when rows of a list are selected: a dark bar floating at the bottom of the screen with the count, the actions and a button that clears the selection. It never pushes the table down, and an action that applies to only some of the rows says so, like Send 3 reminders of 4.

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

*Kestrel's payment reminders with the three invoices that can be reminded selected, then all four, then only the one that cannot be, and Riverside's payments with two court bookings and their total, rendered from the kit. In the app the bar floats at the bottom of the window; here each sits at the foot of its own strip.*

A live screen, rendered from the kit's components on the page: https://meadowstack.com/components/bulk-bar/

## What it is for, and what the preview shows

BulkBar is what a list shows once rows are ticked in a [DataTable](https://meadowstack.com/components/data-table/). It counts the selection, offers the actions that apply to it, and clears it with one button, while the table above stays where it was. Its actions are `Button variant="inverse"`, the light-on-dark buttons made for the bar.

The preview shows the payment reminders of [Kestrel](https://meadowstack.com/examples/accounting-office-documents/), an accounting practice in the demo: four overdue invoices, one of them for a client whose reminders are off. With the other three selected, the action reads Send 3 reminders. With all four, it reads Send 3 reminders of 4. With only that one, the action stays in the bar, disabled, and its tooltip gives the reason. The last bar is from [Riverside](https://meadowstack.com/examples/sports-club-court-bookings/)'s payments, where `summary` adds the total of two court bookings after the count.

## The rules, and where each one lives

- **A bulk action says how many rows it applies to.** "Approve 2 of 5", in the root `AGENTS.md` (Tables) and in `docs/principles.md` (Fewer choices at once), instead of a column of buttons on every row; `docs/patterns.md` names Kestrel's reminders as the example.
- **It floats, it never pushes.** The bar is fixed to the bottom of the window, so the table does not move when the first row is ticked (the manifest's summary), and ticking never changes a row's height (`AGENTS.md`; the audit's `row-heights`).
- **A row that cannot take part says why.** DataTable's `getRowSelectBlockedReason` puts the reason on a disabled checkbox; `docs/patterns.md` pairs it with BulkBar.
- **Every row keeps its checkbox slot.** Each box is 24 by 24px with its label (`AGENTS.md`; the audit's `target-size`).
- **Not for one record.** One record's actions belong in its header or behind a `DropdownMenu` (the manifest's `not`).
- **Named for screen readers.** The bar is a region with its own name that says how many rows are selected, and its clear button, an icon alone, has a label, as `AGENTS.md` (Accessibility) asks of every icon-only button.

## What AI coding tools write instead

The manifest's `replaces`: a hand-built toolbar for selected rows. An assistant usually renders a row of buttons above the table that appears when something is ticked, or a column of buttons on every row.

A toolbar that appears above the table pushes every row down the moment the first box is ticked, so the row under the pointer jumps. Its buttons say Send reminders whatever the selection holds, and a row that cannot take the action fails after the click instead of saying so before it. Buttons on every row multiply the choices on screen and crowd the columns a phone needs. BulkBar keeps the table still, the count in view and each action honest about how many rows it touches.

## How to use it

The props, from BulkBar's signature:

- `count`: how many rows are selected; at zero the bar renders nothing.
- `onClear`: clears the selection, from the bar's close button.
- `summary`: what the selection adds up to, after the count in a quieter weight (a total, hours).
- `children`: the actions, `Button size="sm" variant="inverse"`; a disabled one goes inside a `Tooltip` that gives the reason.

Take the selection from DataTable with `enableSelection` and `onSelectionChange`, block rows with `canSelectRow` and `getRowSelectBlockedReason`, and change `selectionResetKey` after the action to clear the ticks. Bulk actions are part of the [list pattern](https://meadowstack.com/patterns/list/).

## Its entry in the manifest

*The component's rules as the kit's manifest states them, the same entry an AI coding tool reads.*

| Manifest field | BulkBar |
| --- | --- |
| What it is | Appears when rows are selected: a dark bar floating at the bottom of the screen (Linear's selection bar), so it never pushes the table down. Use Button variant="inverse" for the actions inside it. On a phone the actions that do not fit scroll sideways between the count and the close button. |
| Use it for | Actions for the selected rows of a DataTable, saying how many rows they apply to. |
| Not for | For one record's actions (DropdownMenu, the Screen header) |
| It replaces | A hand-built toolbar for selected rows |
| Screen types | Index; Worklist |
| Import | `import { BulkBar } from "@meadowstack-studio/kit";` |

Read from the kit's component manifest when the site was built (126 components, packages/kit/src/components.json); the same entry answers an AI coding tool through the kit's MCP server.

## Where it runs in the example apps

*The example apps whose code renders BulkBar, and in which modules, read from the demo's source.*

| Example app | Modules that render it |
| --- | --- |
| [An app for a packaging and print company](https://meadowstack.com/examples/packaging-print-production/) | Quotes, Cutting dies |
| [An app for a studio or agency](https://meadowstack.com/examples/agency-capacity-planning/) | Finance |
| [An app for a haulage company](https://meadowstack.com/examples/haulage-dispatch-planning/) | Freight, Drivers, Costs |
| [An app for a roastery with an online shop](https://meadowstack.com/examples/coffee-roastery-production/) | Shop |
| [An app for a sports club](https://meadowstack.com/examples/sports-club-court-bookings/) | Club, Coaching, Rentals |
| [An app for a construction company](https://meadowstack.com/examples/construction-site-management/) | Crews, Drawings, Budget |
| [An app for an accounting office](https://meadowstack.com/examples/accounting-office-documents/) | Documents, Bookkeeping, Official mail, Invoicing |
| [An app for restaurants and venues](https://meadowstack.com/examples/restaurant-staff-rota/) | Kitchen |
| [An app for one person](https://meadowstack.com/examples/personal-app-for-a-creator/) | Brand deals |

Read from the demo's source when the site was built: 9 of 9 example apps render <BulkBar>, in the modules named here as each app's sidebar names them.

## How Kestrel's reminders call it

*The send action counts only the invoices that can be reminded and adds "of 4" when that is fewer than the selection; with none it stays, disabled, with the reason in its tooltip.*

From `apps/demo/src/modules/invoicing/pages/reminders.tsx` in the Meadowstack repository:

```tsx
<BulkBar count={count} onClear={onClear}>
  {canRemind ? (
    eligible ? (
      <Button size="sm" variant="inverse" onClick={onSend} loading={busy}>
        <IconBell aria-hidden="true" />
        {eligible === count
          ? tx(`Poslat ${remindersToSend(eligible)}`, `Send ${remindersToSend(eligible)}`)
          : tx(`Poslat ${remindersToSend(eligible)} z ${count}`, `Send ${remindersToSend(eligible)} of ${count}`)}
      </Button>
    ) : (
      <Tooltip
        content={tx("Vybrané faktury teď upomenout nejde.", "The selected invoices cannot be reminded right now.")}
      >
        <span className="inline-flex">
          <Button size="sm" variant="inverse" disabled>
            <IconBell aria-hidden="true" />
            {tx("Poslat upomínku", "Send reminder")}
          </Button>
        </span>
      </Tooltip>
    )
  ) : null}
  <Button size="sm" variant="inverse" onClick={onExport}>
    <IconDownload aria-hidden="true" />
    {tx("Exportovat", "Export")}
  </Button>
</BulkBar>
```

## Questions

### Why does the bar float instead of sitting above the table?

So the table never moves. A toolbar that appears above the rows pushes them down the moment the first box is ticked; the floating bar leaves every row where it was.

### What should an action say when it applies to only some rows?

How many it applies to out of the selection, like Send 3 reminders of 4. When it applies to none, it stays in the bar, disabled, with the reason in its tooltip.

### Can the bar show what the selection adds up to?

Yes. The summary prop puts a total after the count in a quieter weight, such as the amount of the selected bookings or the hours of the selected entries.

### Is BulkBar for the actions of a single record?

No. One record's actions belong in its header or behind its menu. BulkBar is for several rows of a list at once.

## Related

- [DataTable: the table of every list](https://meadowstack.com/components/data-table/) (Components)
- [PropertyList: label left, value right](https://meadowstack.com/components/property-list/) (Components)
- [Data tables in business apps: kinds, figures, headers, cut text](https://meadowstack.com/blog/data-tables-in-business-apps/) (Blog)
- [AsyncState: every data view has four states](https://meadowstack.com/components/async-state/) (Components)
- [FilterBar: the one row above a list](https://meadowstack.com/components/filter-bar/) (Components)
- [ViewPills: saved views that are addresses](https://meadowstack.com/components/view-pills/) (Components)
