RiffleProps<T>
Defined in: vue/Riffle.ts:78
Props for the <Riffle> drop-in, generic over the card type T. Every
RiffleOptions key except count (derived from cards.length) is a prop
here too.
Example
Section titled “Example”import type { RiffleProps } from '@rpxl/riffle/vue'
const props: RiffleProps<{ title: string }> = { cards: [{ title: 'Neon Harbor' }] }Extends
Section titled “Extends”Omit<RiffleOptions,"count">
Type Parameters
Section titled “Type Parameters”T
Properties
Section titled “Properties”
optionalaxis?:Axis
Defined in: types.ts:198
The drag axis. Default 'x'. Immutable after construction: update() throws on a change.
Inherited from
Section titled “Inherited from”bounds?
Section titled “bounds?”
optionalbounds?:Bounds
Defined in: types.ts:196
'loop' wraps past the ends, 'clamp' stops there. Default 'loop'.
Inherited from
Section titled “Inherited from”cardClassName?
Section titled “cardClassName?”
optionalcardClassName?:string
Defined in: vue/Riffle.ts:84
A class for every card element.
cardHeight?
Section titled “cardHeight?”
optionalcardHeight?:number|"auto"
Defined in: types.ts:190
Pixels, or 'auto' to measure a registered card. Default 400 when omitted as a number.
Inherited from
Section titled “Inherited from”cards: readonly
T[]
Defined in: vue/Riffle.ts:80
The cards to render. Each becomes one registered card, in order.
cardWidth?
Section titled “cardWidth?”
optionalcardWidth?:number|"auto"
Defined in: types.ts:188
Pixels, or 'auto' to measure a registered card. Default 300 when omitted as a number.
Inherited from
Section titled “Inherited from”crossFollow?
Section titled “crossFollow?”
optionalcrossFollow?:number
Defined in: types.ts:212
How much the card follows the finger across the axis, 0..1. Default 0.18.
Inherited from
Section titled “Inherited from”draggable?
Section titled “draggable?”
optionaldraggable?:boolean
Defined in: types.ts:206
Whether dragging is enabled. Keyboard navigation stays on regardless. Default true.
Inherited from
Section titled “Inherited from”flingVelocity?
Section titled “flingVelocity?”
optionalflingVelocity?:number
Defined in: types.ts:202
Pixels per millisecond. Default 0.5.
Inherited from
Section titled “Inherited from”
optionalgap?:number
Defined in: types.ts:192
Pixels of space the default fan layout leaves between cards. Default 20.
Inherited from
Section titled “Inherited from”getKey?
Section titled “getKey?”
optionalgetKey?: (card,index) =>PropertyKey
Defined in: vue/Riffle.ts:82
Stable key per card. Defaults to the index; provide one for lists that reorder.
Parameters
Section titled “Parameters”T
number
Returns
Section titled “Returns”PropertyKey
getLabel?
Section titled “getLabel?”
optionalgetLabel?: (index) =>string
Defined in: types.ts:222
A caller-supplied label per card index. The card’s aria-label becomes
${getLabel(i)}, ${i + 1} of ${count}, and announcements use the same
string. Omit it for the bare position.
Parameters
Section titled “Parameters”number
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”layout?
Section titled “layout?”
optionallayout?:LayoutStrategy
Defined in: types.ts:216
The pose strategy. Default fan().
Inherited from
Section titled “Inherited from”maxVisible?
Section titled “maxVisible?”
optionalmaxVisible?:number
Defined in: types.ts:194
How many cards behind the front one stay visible before fading out. Default 4.
Inherited from
Section titled “Inherited from”reducedMotion?
Section titled “reducedMotion?”
optionalreducedMotion?:ReducedMotionMode
Defined in: types.ts:214
Whether to honour prefers-reduced-motion. Default 'auto'.
Inherited from
Section titled “Inherited from”rotation?
Section titled “rotation?”
optionalrotation?:false|RotationOptions
Defined in: types.ts:210
Tilt while dragging, or false to disable it. Default the RotationOptions defaults.
Inherited from
Section titled “Inherited from”spring?
Section titled “spring?”
optionalspring?:SpringPreset|SpringConfig
Defined in: types.ts:208
A named preset, or your own stiffness and damping. Default { stiffness: 340, damping: 34 }.
Inherited from
Section titled “Inherited from”startIndex?
Section titled “startIndex?”
optionalstartIndex?:number
Defined in: types.ts:204
The active card at construction. Read once; call goTo to move later. Default 0.
Inherited from
Section titled “Inherited from”threshold?
Section titled “threshold?”
optionalthreshold?:number
Defined in: types.ts:200
Fraction of one step, 0..1. Default 0.25.