dolfindevelopers

Bill lines

ComponentPayablesSDK + UI

A bill's lines: quantity times unit price, tax, spend category with how it was classified (confirmed, AI or suggested), tags and the line net.

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/ap-bill-lines

Also installs: badge, base-money, base-status-badge, ui-ap-bill-lines.

Usage

screen.tsx
import { BillLines } from "@/components/dolfin/ap/bill-lines";

// Place it anywhere inside your <DolfinProvider>.
<BillLines bill={bill} />

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
bill required{ id?: string; organisationId?: string; state?: components["schemas"]["BillState"]; source?: components["schemas"]["BillSource"]; eInvoiceId…
categoryNamesReadonly<Record<string, string>>Spend category names by key, for the category column. Given, nothing is fetched; otherwise the names are read from the organisation's categories.
renderLineMeta(line: BillLineItem) => ReactNodeExtra content under a line (for example where it posts in your accounting system).
noticestring | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | React.Re…A note above the lines.
emptyStatestring | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | React.Re…Replaces the default note when the bill has no lines.
classNamestring

Customisation

Without editing the source, you can change:

Class names
className
Messages
ap.bill.lines

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.

useBillCategoriesuseMessages

Files

Written to your app by the install command:

  • components/dolfin/ap/bill-lines.tsx 96 lines