@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.
Built on the headless CashflowCard compound from @get-asset/sdk.
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
| Prop | Type | Default | Description |
|---|---|---|---|
dateFrom | CalendarDateString | — | Inclusive 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. |
dateTo | CalendarDateString | — | Inclusive end (YYYY-MM-DD) of the fixed reporting range. Must be paired with dateFrom. |
periods | CashflowPeriodOverride[] | — | Override fetched data — one entry per period on screen. Each entry: { start, startingBalance, endingBalance, changeInCash? }. |
state | "loading" | "error" | — | Force a specific state for testing. |
locked | boolean | — | Gate 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. |
className | string | — | Forwarded 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…