Skip to content
English
List page comes with Pro. Its preview shows once you unlock it.

Usage

import { ListPage } from './ListPage.jsx'

<ListPage
  locale="en"
  rows={projects.list}     // [{ id, name, client, owner, status, due: 'YYYY-MM-DD', budget }]
  statuses={[              // optional: your own statuses; the final one is never overdue and is what Approve moves to
    { id: 'draft', label: 'Draft', tone: 'neutral' },
    { id: 'live', label: 'Live', tone: 'progress' },
    { id: 'done', label: 'Done', tone: 'success', final: true },
  ]}
  currency="EUR"
  today={new Date().toISOString().slice(0, 10)}
  loading={projects.loading}
  error={projects.error}
  onRetry={projects.reload}
  onBulk={async (action, ids) => (await fetch('/api/projects/' + action, { method: 'POST', body: JSON.stringify(ids) })).ok}
  onOpen={(project) => router.push('/projects/' + project.id)}
  onCreate={() => router.push('/projects/new')}
/>

Props

PropTypeDefaultWhat it does
locale'en' | 'zh-CN' | 'es' | 'ja''en'Language of the built-in text, the sample rows and the date and money formats.
rowsArray<{ id, name, client, owner, status, due, budget }>—The records. An empty list shows the first-run empty state, not "no results".
statusesArray<{ id, label, tone: 'neutral' | 'progress' | 'warning' | 'success' | 'danger', final? }>draft, active, review, approvedThe statuses a record can have, in filter order. A `final` one is never overdue and shows a check; Approve moves records to the first final status (no final status: no Approve action).
currencystringby localeISO currency of the budget column, for example EUR.
today'YYYY-MM-DD'—The date overdue and "due this month" are measured from.
pageSizenumber6Rows per page.
loading / errorboolean—Placeholder rows while loading; a message and a retry (onRetry) when the list could not be loaded.
onBulk(action: 'approve' | 'archive' | 'restore', ids) => Promise<boolean | void>—A batch action ran on the selected rows ("restore" is Undo after an archive). Resolve false to leave the rows as they were.
onOpen / onCreate(row) => void / () => void—A project name was opened; New project was pressed.
labelsobject—Replaces any built-in text (keys as in copy.js).

Add it to your project

Pro includes the full source of this block. Copy its prompt to install it with your coding agent.

ListPage.jsxlist-page.csscopy.jskit.jsxkit.cssui/base-button/ui/empty-state/ui/status-tag/ui/alert-banner/ui/select/ui/text-input/ui/skeleton-shimmer/ui/pagination/ui/select-table/tokens.cssREADME.md

The block, its stylesheet and text, the shared kit, the components it uses and tokens.css install together into one folder.