Skip to content

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.

import type { RiffleProps } from '@rpxl/riffle/vue'
const props: RiffleProps<{ title: string }> = { cards: [{ title: 'Neon Harbor' }] }

T

optional axis?: Axis

Defined in: types.ts:198

The drag axis. Default 'x'. Immutable after construction: update() throws on a change.

RiffleOptions.axis


optional bounds?: Bounds

Defined in: types.ts:196

'loop' wraps past the ends, 'clamp' stops there. Default 'loop'.

RiffleOptions.bounds


optional cardClassName?: string

Defined in: vue/Riffle.ts:84

A class for every card element.


optional cardHeight?: number | "auto"

Defined in: types.ts:190

Pixels, or 'auto' to measure a registered card. Default 400 when omitted as a number.

RiffleOptions.cardHeight


cards: readonly T[]

Defined in: vue/Riffle.ts:80

The cards to render. Each becomes one registered card, in order.


optional cardWidth?: number | "auto"

Defined in: types.ts:188

Pixels, or 'auto' to measure a registered card. Default 300 when omitted as a number.

RiffleOptions.cardWidth


optional crossFollow?: number

Defined in: types.ts:212

How much the card follows the finger across the axis, 0..1. Default 0.18.

RiffleOptions.crossFollow


optional draggable?: boolean

Defined in: types.ts:206

Whether dragging is enabled. Keyboard navigation stays on regardless. Default true.

RiffleOptions.draggable


optional flingVelocity?: number

Defined in: types.ts:202

Pixels per millisecond. Default 0.5.

RiffleOptions.flingVelocity


optional gap?: number

Defined in: types.ts:192

Pixels of space the default fan layout leaves between cards. Default 20.

RiffleOptions.gap


optional getKey?: (card, index) => PropertyKey

Defined in: vue/Riffle.ts:82

Stable key per card. Defaults to the index; provide one for lists that reorder.

T

number

PropertyKey


optional getLabel?: (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.

number

string

RiffleOptions.getLabel


optional layout?: LayoutStrategy

Defined in: types.ts:216

The pose strategy. Default fan().

RiffleOptions.layout


optional maxVisible?: number

Defined in: types.ts:194

How many cards behind the front one stay visible before fading out. Default 4.

RiffleOptions.maxVisible


optional reducedMotion?: ReducedMotionMode

Defined in: types.ts:214

Whether to honour prefers-reduced-motion. Default 'auto'.

RiffleOptions.reducedMotion


optional rotation?: false | RotationOptions

Defined in: types.ts:210

Tilt while dragging, or false to disable it. Default the RotationOptions defaults.

RiffleOptions.rotation


optional spring?: SpringPreset | SpringConfig

Defined in: types.ts:208

A named preset, or your own stiffness and damping. Default { stiffness: 340, damping: 34 }.

RiffleOptions.spring


optional startIndex?: number

Defined in: types.ts:204

The active card at construction. Read once; call goTo to move later. Default 0.

RiffleOptions.startIndex


optional threshold?: number

Defined in: types.ts:200

Fraction of one step, 0..1. Default 0.25.

RiffleOptions.threshold