Receivables home
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
Ready to connect to Dolfin. Loads data through SDK hooks, with appearance and behaviour you can customise. Requires DolfinProvider.
Installation
Needs the Dolfin registry token. The CLI copies the source into your app.
bunx --bun shadcn@4.23.0 add @dolfin/ar-homeAlso installs: button, base-theme, base-page, base-money, base-states, ar-stats-cards, ar-activity-feed, ui-ar-home.
Usage
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
| Prop | Type | Description |
|---|---|---|
headerActions | string | 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. |
onboarding | string | 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. |
aside | string | 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. |
emptyState | string | 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). |
hide | readonly ArHomeSection[] | Sections to hide, e.g. `["topCustomers"]`. |
newInvoice | false | DolfinRoute | Where New invoice leads; `false` hides it. Defaults to the `ar.invoiceCreate` route. |
onAskAgent | (prompt: string, tile: ArStatTileKey) => void | Adds an Ask agent button to each stat tile. |
activityLimit | number | How many events the Recent activity card lists; defaults to 5. |
title | string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | React.Re… | Overrides the header copy. |
eyebrow | string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | React.Re… | |
className | string |
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.
useArStatsuseMessagesFiles
Written to your app by the install command:
components/dolfin/ar/ar-home.tsx115 linescomponents/dolfin/ar/ar-home-panels.tsx142 lines