RiffleEventMap (core)
Defined in: types.ts:260
Every event Riffle.on can subscribe to, keyed by name, with each key’s
payload type.
Example
Section titled “Example”riffle.on('change', (event) => console.log(event.index))Properties
Section titled “Properties”change
Section titled “change”change:
object
Defined in: types.ts:262
The active card changed, whether from a drag, a button, or goTo().
direction
Section titled “direction”direction:
-1|1
index:
number
previousIndex
Section titled “previousIndex”previousIndex:
number
drag:
object
Defined in: types.ts:270
Fires once per pointer move, which browsers coalesce to frame cadence. Do not retain the payload: it is reused between calls. Do not allocate in this handler.
offset
Section titled “offset”offset:
number
progress
Section titled “progress”progress:
number
dragend
Section titled “dragend”dragend:
object
Defined in: types.ts:272
A drag gesture ended, committed or not.
committed
Section titled “committed”committed:
boolean
direction
Section titled “direction”direction:
-1|0|1
dragstart
Section titled “dragstart”dragstart:
object
Defined in: types.ts:264
A drag gesture started.
index:
number
pointerType
Section titled “pointerType”pointerType:
"mouse"|"touch"|"pen"
settle
Section titled “settle”settle:
object
Defined in: types.ts:274
The spring reached its target and the stack is at rest.
index:
number