dolfindevelopers

Customers list page

PageReceivablesSDK + UI

The customers list page: header with a New customer action, name and email filters, the customers table, and the create, edit and delete dialogs, with props for header actions, the empty state, an aside and extra form fields.

Page: A complete screen for one route, such as a bill or the invoices list. Mount it on a route in your app; connected SDK pages provide data and actions; standalone UI pages receive them as props. Pages vs components

Choose your integration

Ready to connect to Dolfin. Loads data through SDK hooks, with appearance and behaviour you can customise. Requires DolfinProvider.

Loading preview…

Installation

Needs the Dolfin registry token. The CLI copies the source into your app.

Terminal
bunx --bun shadcn@4.23.0 add @dolfin/ar-customers-list-page

Also installs: button, base-theme, base-page, base-info-hint, ar-customers-table, ar-create-customer-dialog, ar-edit-customer-dialog, ar-customer-delete-dialog, ui-ar-customers-list-page.

Usage

route.tsx
import { ArCustomersListPage } from "@/components/dolfin/ar/customers-list-page";

// A whole screen: mount it on a route, inside your <DolfinProvider>.
export default function Route() {
  return <ArCustomersListPage />;
}

Renders inside DolfinProvider (set it up once). By default it loads its own data through the SDK. Supplied-data examples show how to override that behavior.

API reference

PropTypeDescription
filtersCustomerListFiltersInitial filters, e.g. read from the URL.
onFiltersChange(filters: CustomerListFilters) => voidCalled once a filter change applies (after the 400ms debounce), e.g. to write it to the URL.
onCreated(customer: Customer) => voidAfter a customer was created from the page.
readOnlybooleanHide the New customer button and the row Edit and Delete actions.
onNavigate(route: DolfinRoute) => void
pageSizenumber
columnsCustomerColumn[] | ((defaults: CustomerColumn[]) => CustomerColumn[])
columnOrderreadonly string[]
columnVisibilityReadonly<Partial<Record<string, boolean>>>
rowActionsCustomerRowAction[] | ((defaults: CustomerRowAction[]) => CustomerRowAction[])
headerActionsstring | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | React.Re…Rendered before the New customer button.
emptyStatestring | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | React.Re…Replaces the table's empty state.
asidestring | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | React.Re…Rendered beside the list on wide pages.
formFieldsstring | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | React.Re…Extra fields in the create and edit dialogs (e.g. e-invoicing or WhatsApp settings).
titlestring | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | React.Re…
eyebrowstring | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | React.Re…
descriptionstring | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | React.Re…
classNamestring

Customisation

Without editing the source, you can change:

Class names
className
Messages
ar.customers

Or edit the installed file directly: it is your code. See theming for colours and fonts.

Hooks

The SDK hooks this page uses. Use them directly from @dolfinai/react to build your own version.

useCanManageCustomersuseCustomersuseMessages

Files

Written to your app by the install command:

  • components/dolfin/ar/customers-list-page.tsx 199 lines