@get-asset/react
AssetSnapshotCard
Styled card showing the period's revenue and expense side by side with the resulting net profit and its change versus the prior period. Period defaults to the AssetProvider's year/month — pass a month to show that month vs. the previous month, omit it to show the full year vs. the previous year.
Built on the headless SnapshotCard compound from @get-asset/sdk.
Preview
Snapshot
$47,000.00
Net profit for 2026
↑ 24%
from previous period
Expense
Revenue
-$78,000.00
$125,000.00
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 |
|---|---|---|---|
year | number | — | Fiscal year to report on. Falls back to the AssetProvider's year. |
month | number | null | — | Month (1-12). When set the card shows that month vs. the previous month; null explicitly forces a whole-year range. Falls back to the AssetProvider's month (default: no month). |
revenue | number | — | Override fetched revenue. Skips the API call. |
expense | number | — | Override fetched expense. |
previousNetProfit | number | — | Override fetched prior-period net profit (used for the change tone). |
state | "loading" | "error" | "empty" | — | 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 summary 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 `revenue`/`expense` 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
Snapshot
Net profit for 2026
from previous period
Expense
Revenue
Success
Snapshot
$47,000.00
Net profit for 2026
↑ 24%
from previous period
Expense
Revenue
-$78,000.00
$125,000.00
EmptyNo revenue or expenses recorded.
Snapshot
Error
Snapshot
We couldn't load your Snapshot. Refresh the page or click try again.
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`.