KQ-668 · HARVEST/TAP
Harvest Tap
An accrued-rewards figure that climbs from a motion value rather than state, so it runs continuously without a render per frame, and holds while the document is hidden. Harvesting reads the figure in the press handler and sweeps a ghost of it into the balance on glide over the distance actually measured between the two rows, rolls the balance's digits on snap, and drops the emptied row back to zero on recoil. The Harvest button is a real button that disables itself below minHarvest, and the collected sum is announced once on the press rather than per tick.
Balance 1,250.00 BSN · tap closed · harvested 0× 0.00 BSN
Install
One command — the source lands in your repo. Or copy it from the Code tab.
$ pnpm dlx shadcn@latest add @kinetiq/harvest-tap
Props
- balance
- number
- default —
- The collected balance; its digits roll when it changes.
- accrued
- number
- default 0
- The figure the tap starts from; changing it reseeds the climbing readout.
- rate
- number
- default 0
- Units accrued per second while accruing.
- accruing
- boolean
- default false
- Runs the climb; paused while the document is hidden.
- symbol
- string
- default —
- Ticker for both figures, e.g. "BSN".
- format
- (value: number) => string
- default Intl.NumberFormat("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 2 })
- Formats every figure, in the readouts and the spoken sentences.
- minHarvest
- number
- default 0
- Below this the Harvest button is disabled and names the threshold.
- onHarvest
- (amount: number) => void
- default —
- Fires from the press, carrying the figure at the moment it was pressed.
- label
- React.ReactNode
- default —
- Visible heading; omit it and pass aria-label.
| Prop | Type | Default | Description |
|---|---|---|---|
| balance | number | — | The collected balance; its digits roll when it changes. |
| accrued | number | 0 | The figure the tap starts from; changing it reseeds the climbing readout. |
| rate | number | 0 | Units accrued per second while accruing. |
| accruing | boolean | false | Runs the climb; paused while the document is hidden. |
| symbol | string | — | Ticker for both figures, e.g. "BSN". |
| format | (value: number) => string | Intl.NumberFormat("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 2 }) | Formats every figure, in the readouts and the spoken sentences. |
| minHarvest | number | 0 | Below this the Harvest button is disabled and names the threshold. |
| onHarvest | (amount: number) => void | — | Fires from the press, carrying the figure at the moment it was pressed. |
| label | React.ReactNode | — | Visible heading; omit it and pass aria-label. |