# Bulk Select

A selectable list with a floating action bar: shift-click ticks a range in a wave, the count pill widens into a toolbar, pointing at an action tints the rows it will touch, and archived rows collapse as their avatars fly into the bar.

- Page and source: https://uibrik.com/components/bulk-select
- Install (Pro, needs a license key, see https://uibrik.com/docs/pro): `npx shadcn@latest add @uibrik-pro/bulk-select`
- Packages: none beyond React
- Import: `import { BulkSelect } from "@/components/uibrik/bulk-select/bulk-select"`

Where to use the Bulk Select React component:

- **Inboxes and queues**: Shift-click ranges and a live count make clearing dozens of rows quick and certain. Pairs with [Swipe Rows](https://uibrik.com/components/swipe-rows).
- **Admin tables**: Tinting the rows an action will touch shows its reach before anything happens. Pairs with [Data Table](https://uibrik.com/components/data-table).
- **Safe bulk deletes**: Avatars flying into the bar and a one-tap Undo make a big change easy to take back. Pairs with [Inline Confirm](https://uibrik.com/components/inline-confirm).

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| accent | `string` | `"#2563eb"` | Colour of the checkboxes and the selected rows' tint. |
| stagger | `number` | `18` | Delay between rows when a range ticks or clears in a wave. |
| undoTimeout | `number` | `5` | Seconds the confirmation stays before the bar leaves. Pointing at it pauses the clock. |
| selectAll | `boolean` | `true` | A Select all row above the list. |
| radius | `number` | `24` | Corner radius of the panel. |
| items | `{ id: string; title: string; subtitle?: string; meta?: string; avatar?: string; initials?: string }[]` |  | Rows, in order. Avatars fall back to the title's initials. |
| actions | `{ id: string; label: string; icon?: ReactNode; past?: string; removes?: boolean; destructive?: boolean }[]` |  | Toolbar actions. `removes` collapses the rows and flies their avatars into the bar; `destructive` tints the rows red while pointed at; `past` words the confirmation ("6 archived"). |
| selected / defaultSelected / onSelectedChange | `string[] / string[] / (ids) => void` |  | Selected ids, controlled or not. |
| onAction | `(actionId, ids) => void` |  | Runs when an action is pressed, with the ids it applies to. |
| onUndo | `(actionId, ids) => void` |  | Runs when Undo is pressed. Removed rows come back selected. |
| className | `string` |  | Classes for the panel. |
