dolfindevelopers

Receivables home

PageReceivablesSDK + UI

The receivables overview page: header with a New invoice link, the stat tiles, customers needing attention, recent invoice activity and top customers, with props for an onboarding checklist, header actions, the empty state and an aside.

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-home

Also installs: button, base-theme, base-page, base-money, base-states, ar-stats-cards, ar-activity-feed, ui-ar-home.

Usage

route.tsx
import { ArHome } from "@/components/dolfin/ar/ar-home";

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

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
headerActionsstring | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | React.Re…Replaces the New invoice link on the right of the header.
onboardingstring | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | React.Re…Rendered under the header, before the figures: the place for a getting-started checklist (see `useArOnboardingStatus` from `@dolfinai/react/ar`), including steps the SDK does not cover such as taking card payments. The SDK renders no checklist of its own.
asidestring | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | React.Re…Rendered after the panels, full width: payment settings, accounting sync status, anything of your own.
emptyStatestring | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | React.Re…Replaces the stat tiles' empty state (an organisation with no invoices at all).
hidereadonly ArHomeSection[]Sections to hide, e.g. `["topCustomers"]`.
newInvoicefalse | DolfinRouteWhere New invoice leads; `false` hides it. Defaults to the `ar.invoiceCreate` route.
onAskAgent(prompt: string, tile: ArStatTileKey) => voidAdds an Ask agent button to each stat tile.
activityLimitnumberHow many events the Recent activity card lists; defaults to 5.
titlestring | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | React.Re…Overrides the header copy.
eyebrowstring | 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.home

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.

useArStatsuseMessages

Files

Written to your app by the install command:

  • components/dolfin/ar/ar-home.tsx 115 lines
  • components/dolfin/ar/ar-home-panels.tsx 142 lines