dolfindevelopers
SDK: CONNECTED COMPONENTS

Start with a working finance experience

Add the Bills table to your app. The CLI copies its source into your repo, so you can restyle or edit anything afterwards.

Before you start: complete the shared registry setup. You will also need Dolfin API access and an authenticated server integration to connect this example.
Loading preview…

01Example: install your first connected component

Use the shared private registry setup for both SDK and UI components. Then install the SDK package and this example Bills table from your app's root:

Terminal
bun add @dolfinai/react

Using npm or pnpm? Run npm install @dolfinai/react or pnpm add @dolfinai/react.

Terminal · Bun
bunx --bun shadcn@4.23.0 add @dolfin/ap-bills-table
Using npm or pnpm?
Terminal · npm
npx shadcn@4.23.0 add @dolfin/ap-bills-table
Terminal · pnpm
pnpm dlx shadcn@4.23.0 add @dolfin/ap-bills-table

This is one example, not a required starter component. Replace ap-bills-table with another name from the Connected SDK catalog to install a different experience.

The CLI writes the table to components/dolfin/ap/bills-table.tsx, along with the shadcn primitives and Dolfin theme tokens it needs. Your existing shadcn theme is not changed.

02Connect to Dolfin

Follow Connect to Dolfin to configure server authentication and wrap your finance screen in DolfinProvider. Your registry token only downloads source; the provider uses separate API authentication. Return here once the provider is connected.

03Render it

bills.tsx
"use client";

import { ApBillsTable } from "@/components/dolfin/ap/bills-table";

// Must render inside DolfinProvider (see Connect to Dolfin).
export function Bills() {
  return <ApBillsTable />;
}

No props needed. The table fetches bills through the SDK, paginates, and shows loading, empty and error states on its own.

04Handle events and customise

bills.tsx
<ApBillsTable
  onRowClick={bill => openBill(bill.id)}
/>

openBill is your application callback. The table calls it when a row is activated. To change how it looks, adjust your shadcn theme tokens or edit the installed file directly: it is your code now.

See theming. Need a layout the component cannot do? Use the useBills hook it is built on and write your own markup.

REFERENCE

Bills table: props, states and source