Skip to content

RiffleSnapshot (core)

Defined in: types.ts:236

Discrete state only. High-frequency values live behind getters on Riffle.

import type { RiffleSnapshot } from '@rpxl/riffle'
const snapshot: RiffleSnapshot = riffle.getSnapshot()
console.log(snapshot.activeIndex, snapshot.canNext)

activeIndex: number

Defined in: types.ts:238

The card currently at the front.


canNext: boolean

Defined in: types.ts:248

Whether next() would move the stack.


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: boolean

Defined in: types.ts:242

Whether a pointer is currently dragging the stack.


isSettling: boolean

Defined in: types.ts:244

Whether the spring is still animating toward its target.