RiffleSnapshot (core)
Defined in: types.ts:236
Discrete state only. High-frequency values live behind getters on Riffle.
Example
Section titled “Example”import type { RiffleSnapshot } from '@rpxl/riffle'
const snapshot: RiffleSnapshot = riffle.getSnapshot()console.log(snapshot.activeIndex, snapshot.canNext)Properties
Section titled “Properties”activeIndex
Section titled “activeIndex”activeIndex:
number
Defined in: types.ts:238
The card currently at the front.
canNext
Section titled “canNext”canNext:
boolean
Defined in: types.ts:248
Whether next() would move the stack.
canPrev
Section titled “canPrev”canPrev:
boolean
Defined in: types.ts:246
Whether prev() would move the stack.
count:
number
Defined in: types.ts:240
How many cards are in the stack.
isDragging
Section titled “isDragging”isDragging:
boolean
Defined in: types.ts:242
Whether a pointer is currently dragging the stack.
isSettling
Section titled “isSettling”isSettling:
boolean
Defined in: types.ts:244
Whether the spring is still animating toward its target.