dolfindevelopers

Customer details

ComponentReceivablesSDK + UI

A customer's contact, address and record cards, plus the balance strip: what they owe you and how much is overdue, per currency, from their open invoices, with loading and error states.

Component: A piece you place inside your own screens: a table, a form, a card or a dialog. You decide the layout around it. 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-customer-details

Also installs: base-theme, base-page, base-states, ui-ar-customer-details.

Usage

screen.tsx
import { ArCustomerDetails } from "@/components/dolfin/ar/customer-details";

// Place it anywhere inside your <DolfinProvider>.
<ArCustomerDetails customer={customer} />

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
customer required{ id?: string; organisationId?: string; name: string; email?: null | string; phone?: null | string; taxNumber?: null | string; addressLine1?…
childrenstring | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | React.Re…Extra cards before the record card (e.g. e-invoicing or WhatsApp settings).
classNamestring

Customisation

Without editing the source, you can change:

Class names
className
Messages
ar.customers.balancear.customers.details

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

Hooks

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

useCustomerBalanceuseDolfinLocaleuseMessages

Files

Written to your app by the install command:

  • components/dolfin/ar/customer-details.tsx 108 lines
  • components/dolfin/ar/customer-balance.tsx 101 lines