Skip to Content
Which part for what

Records

Board, DataTable and DataList.

Board

Use Board, BoardLane and BoardCard for records in lanes.

  • Lanes are 272px wide and never squeezed, and the board scrolls sideways when they do not fit.
  • The head of a lane is 30px high. It has a dot or icon, the name, a count and an add control, and it highlights when a card is dragged over it.
  • A card is a fixed 112px slot. It has a top row with a key and a person, a title cut to two lines, and the meta row on its bottom edge. BoardCardTop, BoardCardTitle and BoardCardMeta build the card of an entity.
  • In a board view, fill makes lanes scroll inside, and placed cards let a lane render only what is visible.
  • In a document, lanes are as tall as their cards.
  • Below 560px of the board's own width the board is grouped lists with 44px rows. This is a container query, and useBoard().stacked() reports it.
  • Selection is a neutral fill, and the cursor is the focus ring.
Lanes that scroll sidewaysEach lane is 272px whatever the room: when they do not fit, the board scrolls sideways inside itself. Drag a card to another lane; a click selects it.
Open the example ↗
The card's slotOne height for every card: the top row, a title of at most two lines, and the meta row on the bottom edge, so a short title leaves its space above the meta, not under it.
Open the example ↗
On a phone: grouped listsNarrower than 560px of its own width, the same board shows a section per lane and its cards as rows.
Open the example ↗
Board in the gallery ↗

DataTable

Use DataTable for a table of records. Rows are 30px compact and 36px comfortable, and columns can sort.

  • selectable works as in a list. A click opens a row, and a click with Cmd, Ctrl or Shift selects. Checkboxes show on hover, on focus, and while something is selected. There is a select-all box. Selection is a neutral fill. The toolbar becomes the bulk bar only while something is selected.
  • onReorder moves rows. Drag the row itself, or use Alt and an arrow key. A line shows where it drops, and the table scrolls at its edges. It works only while the table is not sorted by a column.
  • onRemove removes rows, with Undo.
  • rowMenu is the row menu, as a RowList has.

The table is one tab stop, and the arrow keys move between rows. Use a RowList for a list of things with one title each.

InteractiveSelect a row to turn the toolbar into the bulk bar. Esc clears. Sort by state, started or output.
Open the example ↗
Reorder, remove and a menu per rowDrag a row to move it (a press that does not move opens it), or Alt and an arrow on a row. Sorting by a column turns reordering off: a sorted table's order is the column's. Cmd or Ctrl and a click selects, Shift a range; the checkboxes show on hover and while something is selected. Right-click a row, or press the Menu key or Shift+F10 on it: on a row of the selection the menu acts on all of it. Delete removes, with Undo.
Open the example ↗
Loading
Open the example ↗
Empty, with filters
Open the example ↗
Error
Open the example ↗
DataTable in the gallery ↗

DataList

Use DataList for records edited in place.

  • Tags and URLs, with one field.
  • Environment variables, with fields for a name and a value.
  • Any record of a few short fields.

The compact form goes in a form (boxed, a box like a field) or in an inspector (inline, rows on the edge). variant="table" adds a header row, for many records.

It selects, reorders, removes with Undo, adds, and moves by keyboard as a DataTable does, with the same row menu. In a field, Enter, Backspace and the arrow keys work on the caret. Escape goes to the row.

On a phone it is an iOS form group. SchemaForm uses it for arrays of strings and of small records. Records that open are a RowList with onAdd, not a DataList.

Records edited as a tablevariant="table" with selectable: the checkbox, a click on a row's edge (Cmd or Ctrl toggles, Shift extends), or Space on a focused row selects; the bar at the foot shows only while something is selected. Right-click a row, or press the Menu key or Shift+F10: on a row of the selection the menu acts on all of it. Escape leaves a field for its row; Delete removes, with Undo.
Open the example ↗
Editable lists in a formThe compact form: each row its fields, the add row last. A click selects a row and a drag from anywhere on it moves it; a double click edits the field under the pointer. Delete in its menu, or on the selected row, removes it. Enter goes to the next row (from the last, adds one), Backspace in an empty field removes it, the arrows move between rows and Alt and an arrow moves a row. A row says under it what is wrong with it.
Open the example ↗
In an inspectorvariant="inline" drops the box: in a property's value the rows sit on the value's edge, 28px like the property rows.
Open the example ↗
On a phoneAn iOS form group: swipe a row to the left to delete it, press and hold its edge for its menu and move the finger to drag it; the add row is in the accent.
Open the example ↗
One field-like groupThe list is one box like a field: each row a field and a quiet remove, the add row last.
Open the example ↗
A stack of fields and buttonsEach item a labelled field of its own with a Remove button, and a big Add under them: three times the height, no order, and no keyboard between the rows.
Open the example ↗
DataList in the gallery ↗
Edit on GitHub

Last updated on

On this page