Avatar
/

foundations

IntroductionColorGridIconsPlayground

components

BadgeBreadcrumbsButtonCalendarCapacityComboboxDescriptionEntityFieldsetFile TreeFooterInputKeyboard InputLoading DotsMenuModalNotePillRadioSelectShow MoreSpinnerStackStatus DotSwitchTableTabsTextTextareaToggleTooltip
SwitchTabs
const columns = [
  {
    Header: "First Name",
    accessor: "first",
  },
  {
    Header: "Last Name",
    accessor: "last",
  },
  {
    Header: "Email",
    accessor: "email",
  },
];

const data = [
  {
    first: "John",
    last: "Doe",
    email: "john@doe.com",
  },
  {
    first: "Dorothy",
    last: "Boe",
    email: "dorothy@boe.com",
  },
  {
    first: "Baby",
    last: "Moe",
    email: "baby@moe.com",
  },
];

Table

Display tabular data in row format. Some examples use the following variables for brevity:

Default

Always provide a caption. Columns and data must be memoized.

Code Editor

Placeholder

Code Editor

Empty

Use the same number of placeholder rows used while loading to avoid layout shift.

Code Editor

Column Align

Set the align property to change text alignment. Left by default.

Code Editor

Overflow

Pass a number to change the minimum width of the table. Disable with a falsy value.

Code Editor

Sticky Header

Specify a number to change the offset from 0.

Code Editor

Sortable Rows

Hold shift to sort by multiple columns. Columns can disable sorting.

Code Editor