@get-asset/react

Cashflow Card

Styled card showing starting and ending bank balances per period with the net change in cash for each. Periods come from the range on screen — the AssetProvider's shared range (driven by the DatePicker) unless dateFrom / dateTo pin it. A range that is exactly one month, quarter or year shows two columns, that period and the one before it; any other range shows one column per calendar month it overlaps, with the figures clipped to the range.

Preview

Loading preview…

Required scopes

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

  • report:read

API reference

Root props

PropTypeDefaultDescription
dateFromCalendarDateStringInclusive start (YYYY-MM-DD) of a fixed reporting range. Detaches the card from the AssetProvider's shared range entirely; must be paired with dateTo (passing one side alone throws). Use periodDateRange to derive the pair from a month, quarter or year. Omit both to follow the provider's DatePicker-driven range.
dateToCalendarDateStringInclusive end (YYYY-MM-DD) of the fixed reporting range. Must be paired with dateFrom.
periodsCashflowPeriodOverride[]Override fetched data — one entry per period on screen. Each entry: { start, startingBalance, endingBalance, changeInCash? }.
state"loading" | "error"Force a specific state for testing.
lockedbooleanGate the report for a viewer who isn't entitled to it. Activates the SDK's Locked state: the period table renders blurred and inert as a teaser behind a lock and the upgrade CTA. No live fetch runs while locked — the teaser shows built-in placeholder data (a `periods` override still wins).
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 report.
classNamestringForwarded to the outer card element.

States

Loading

Loading preview…

Success

Loading preview…

EmptyNo periods returned.

Loading preview…

Error

Loading preview…

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

Loading preview…