@get-asset/react

Book Health

Styled card answering “are my books healthy?” for one fiscal year of the business (calendar years when its fiscal year starts in January): a summary fraction over a twelve-segment meter, a month grid where each month carries a check (closed and verified), a count chip (open tasks waiting on the user), or a dash (not yet due), and the open tasks. The task list is the Tasks component itself — rows, upload, note, and reconnect flows included — scoped to the year or the selected month. Clicking a month filters it; hovering one (desktop only) shows a per-category breakdown. A year dropdown offers previous years back to the business's entries start and hides when there are none — the card is deliberately decoupled from the AssetProvider's shared date range.

Preview

Loading preview…

Required scopes

The access token used by AssetProvider must include these scopes for this primitive to fetch data successfully:

  • business:read
  • request:read
  • plaid:create
  • document:create
  • journal_entry:read
  • journal_entry:create

API reference

Root props

PropTypeDefaultDescription
monthsBookHealthMonthData[]Override fetched months (skips every API fetch). Each entry is { month: 'YYYY-MM', status, tasks? } — tasks ride on their month.
entriesStartstringOverride the business's entries_start date (YYYY-MM-DD), which decides the fiscal years the picker offers. The picker hides when there are no previous years.
fiscalYearStartstringOverride the business's fiscal-year start anchor (MM/DD), which decides where each twelve-month window begins. Defaults to the business's fiscal_year; January when unknown. With entriesStart, providing it skips the business fetch.
state"loading" | "error" | "empty"Force a specific state for testing.
lockedbooleanGate the card for a viewer who isn't entitled to it. Activates the SDK's Locked state: the card renders blurred and inert as a teaser behind a lock and the upgrade CTA. No fetch runs while locked.
upsell{ title?, description?, ctaLabel?, onUpgrade? }Customize the locked state's copy and action. `ctaLabel` and `onUpgrade` are the tenant's upgrade wording and handler; `title` / `description` default per card.
onReviewTask(task: TasksTask) => voidHand a month-level review task off to your transactions page for its month — reviewing is how those tasks complete. The nested list's arrow button is a no-op while unset.
classNamestringForwarded to the outer card element.

States

LoadingThe summary skeletonizes; the month grid shows plain labels, no marks.

Loading preview…

Success

Loading preview…

Caught upNothing waiting on the user — a neutral banner ("Nothing is waiting on you.") replaces the group list.

Loading preview…

EmptyNo books yet — connect accounts first.

Loading preview…

Error

Loading preview…

LockedViewer isn't entitled to the card — a built-in placeholder teaser renders blurred behind the upgrade prompt. Pass `upsell` to customize the copy and wire `onUpgrade`.

Loading preview…