Skip to content
nexubDesign System
v11.9.0

Patterns · Pages

Table page

TablePage

The standard list of records: saved segments, search and filters, a data table with row and bulk actions, paging, and the loading, empty and error states.

Web

Live, at a real viewport width. Switch to Phone to see the responsive layout.

Usage

TSX
import { TablePage } from '@nexub/patterns';

<TablePage
  title="Projects"
  actions={<Button onClick={create}>New project</Button>}
  columns={columns}
  data={projects}
  getRowId={(p) => p.id}
  tabs={[{ id: 'all', label: 'All', count: 42 }, { id: 'active', label: 'Active' }]}
  tab={tab}
  onTabChange={setTab}
  search={{ value: query, onChange: setQuery, placeholder: 'Search projects…' }}
  activeFilterCount={filters.length}
  onClearFilters={clear}
  onRowOpen={(p) => router.push(`/projects/${p.id}`)}
  rowActions={(p) => <RowMenu project={p} />}
  bulkActions={(rows, done) => <Button onClick={() => archive(rows).then(done)}>Archive</Button>}
  pagination={{ pageSize: 20 }}
  loading={isLoading}
/>