Tables in drawers, and bulk actions
A page table and a drawer table do different jobs, so they aren't styled the same. This guide sets the column budget, the table card and the way rows are selected and acted on — in a drawer and on a page — and where a page table's context goes. See also how a table stacks and modal or drawer.
A page table is a workspace; a drawer table is a picker. It carries only the columns the decision turns on, and it never scrolls sideways. If it needs more, it has outgrown the drawer.
The example
Broadcasting an open shift: pick the workers, send one offer. Four columns and a checkbox, in one card inside the drawer's padding.
Tick a couple of rows to see the selection bar, and try Dev Patel — a blocked row can't be picked, and hovering the checkbox says why.
Flush or detached
A table that's alone in its container is flush. A table with anything else in the container is detached.
- The table's own bands aren't “more”. Its header, toolbar, note bands, selection bar and pagination are all part of the table, so a Services card with a Default Charge Item note is still flush.
- “More” is anything that isn't the table: form fields, a summary, settings, another table.
- A detached table gets its own header.Its section heading becomes the card's white header band, above the search.
- Drawers are the same rule.A drawer body almost always carries more, so its tables are detached inside the drawer's padding.
One card, inside the padding
A table is rarely the only thing in a drawer. Keep the drawer's padding and give the table one card of its own — never a card inside a section card.
Column budget
Production's version of this drawer grew to 90vw for ten columns and still cut the last one off. The budget is what stops that.
| Drawer width | Columns | What fits |
|---|---|---|
| sm:max-w-xl | 3 including the checkbox | A short pick-list — name, one criterion, one status |
| sm:max-w-3xl | 5 including the checkbox | The broadcast drawer: worker, preferences, history, availability |
| wider than that | None | It's a page. Don't widen a drawer to fit a table |
Over budget? Drop a column that is reference rather than criteria, stack a secondary value under the primary one, or fold the detail into a chip and its tooltip. A drawer table also shows every row it has — no pagination. If search can't cut the list down, it belongs on a page.
Selecting rows
Same kit on a page. The bar is a new row between the toolbar and the column headers — at the top, where the actions can't be missed — and search and filters stay usable while a selection is live.
| Support Worker | Preferences | Past shifts | Availability | |
|---|---|---|---|---|
| Tomas Vidal0468 310 486 | Preferred | 12 | Available | |
| Sophie Mereweather0497 452 538 | Preferred | 3 | Available | |
| Aroha Ngata0427 227 793 | None | None | Available | |
| Dev Patel0477 725 095 | Incompatible | None | Available |
- Select-all is tri-state and only ever covers the rows currently listed — never what a filter is hiding.
- The selection survives search and filtering. The bar reports what went out of sight: “3 selected · 1 hidden by filters”.
- The bar is a new row at the top. It appears between the toolbar and the column headers on the first tick and pushes the rows down — an accepted shift, because bulk actions at the bottom went unnoticed. It never replaces the toolbar: people search, select, then search again.
- Row click differs by table. In a picker the row toggles; in a list whose rows open a record, only the checkbox selects.
- An action that can't apply to every selected row is disabled, with the reason on hover — never silently skipped.
- Destructive bulk actions confirm in a modal that names the count, then clear the selection and toast.
Tables on page cards
A table alone on a page card is the card: flush, with no box inside a box. Context the rows depend on but that isn't a row goes in a note band of that same card (DES-32).
Services
| Name | Management Type | Amount |
|---|---|---|
| Level 2 Coordination | Self Managed | $4,806.72 |
| Group Activities | NDIA Managed | $3,000.00 |
- Band order is its own guide now — how a table stacks: header → alerts → stats → toolbar → selection bar → rows → note band → pagination footer. Pagination is always the last band; the selection bar is the last band before the column headers, against the rows it counts.
- The note band follows the rows— a setting or default they lean on (the default charge item, the item remaining units are counted in). DES-32 specced a top-of-table variant as well; nothing needed one, so it's retired.
- One note band per table. It holds a few labelled values side by side with an inline edit at most; more than that is a card of its own.
- A table that's a field in a form is detached(see Flush or detached). The charge-item picker in the Update Service form has its own TableCard, with “Charge Items” as its header, search as its toolbar band, and the setting that depends on the ticked rows (“Calculate remaining units using”) as its bottom note band.
- An unset value says so:“Not set” beside its pencil, not a bare warning glyph.
Do / Don't
- Carry only the columns the decision turns on — reference belongs on the page
- Stack a secondary value under the primary one (phone under name)
- Keep the drawer's padding and give the table one card of its own, so other content can sit above and below it
- Put the selection bar in a new row at the top of the table, between the toolbar and the column headers
- Name the count on the primary button: "Broadcast to 3"
- Disable a blocked row's checkbox and say why on hover
- On a page, make the table the card and put context it depends on in a note band inside it
- Don't widen the drawer to fit more columns
- Don't scroll a drawer table sideways — drop, stack or fold instead
- Don't paginate in a drawer; if search can't cut it down, it's a page
- Don't run the table to the drawer's edges, and don't nest its card in a section card — that's three borders
- Don't let select-all reach rows the current filter is hiding
- Don't let a helper like "Preferred only" replace a selection someone made by hand
- Don't leave the count in a heading, far from the button that acts on it
- Don't box a page table inside its card, or put its context in a third outlined box under it
Sources
The framework distils published guidance — worth reading in full when a case doesn't fit neatly.
- Nielsen Norman Group — Data Tables: Four Major User Tasks
- IBM Carbon — Data table usage (batch actions)
- Shopify Polaris — Resource list
- Material Design 3 — Data tables
- Atlassian Design — Dynamic table
Agents get the same rules in condensed form: apps/next/docs/ux-guides/tables-in-drawers.md — keep both in sync when the framework changes.