choice.bulk
Picks a row to act on together with others: the checkbox at the start of a table row. Pass pressed while picked; show a layout.toolbar of actions while any are picked
Read https://www.prongs.dev/docs/intents/choice/bulk.md and tell me whether choice.bulk fits what I am building.Choice intents
Example
| Ada Lovelace | Owner | |
| Alan Turing | Admin | |
| Grace Hopper | Member |
<td>
<Action intent="choice.bulk" pressed={picked.has(row.id)} icon={<BulkBox on={picked.has(row.id)} />}
label={`Select ${row.name}`} onClick={() => toggle(row.id)} />
</td>Code that says select, bulk, checkbox, pick points here. prongs check warns when an element with this intent has a handler or label that points somewhere else.
Connections
Choosing between neighbours
If it is
Use
Picks a row to act on together with others: the checkbox at the start of a table row. Pass pressed while picked; show a layout.toolbar of actions while any are picked
choice.bulkNarrowing which items are shown
choice.filter
For registry authors
Pack intent. prongs add saas puts the saas pack’s intents in your registry. They are then yours like the starter intents: rename, restyle and add to them, and see them with prongs add gallery.
What this intent is built from and its entry in components/prongs/registry.ts. You only need this to change how it looks or to add an intent like it.
How choice.bulk resolves, and its definition
Each layer adds to the one before it; a later class wins over an earlier one that sets the same thing.
control.baseShape and behaviour shared by every button
inline-flex shrink-0 items-center justify-center gap-2 whitespace-nowrap rounded-md px-4 py-2 text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 ring-offset-surface disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[tone=danger]:[--row-fg:var(--destructive)]
control.ghostNo fill until hovered
text-foreground hover:bg-surface-hover data-[tone=danger]:text-destructive
choice.bulkPicks a row to act on together with others: the checkbox at the start of a table row. Pass pressed while picked; show a layout.toolbar of actions while any are picked
inline-flex shrink-0 items-center justify-center gap-2 whitespace-nowrap rounded-md px-4 py-2 text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 ring-offset-surface disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[tone=danger]:[--row-fg:var(--destructive)] text-foreground hover:bg-surface-hover data-[tone=danger]:text-destructive
'choice.bulk': {
kind: 'semantic',
description: 'Picks a row to act on together with others: the checkbox at the start of a table row. Pass pressed while picked; show a layout.toolbar of actions while any are picked',
refs: ['control.ghost'],
keywords: ['select', 'bulk', 'checkbox', 'pick'],
notFor: [
{ context: 'narrowing which items are shown', instead: 'choice.filter' },
],
},