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
Choice intents
Example
| Ada Lovelace | Owner | |
| Alan Turing | Admin | |
| Grace Hopper | Member |
<td>
<Action intent="choice.bulk" pressed={picked.has(row.id)} icon={picked.has(row.id) ? <SquareCheck /> : <Square />}
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.
Choosing between neighbours
Find the row that describes your element, and use the intent on the right.
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.bulkthis pageNarrowing which items are shown
choice.filter
Connections
Declared in the registry, both directions. Where an intent is used in your own code is something check and the gallery see; this site has no app code.
- Built from
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' },
],
},