Deck Swiper

Display a stack of swipeable cards

With the Deck Swiper component you can add an interactive stack of swipeable cards to your app. You might have seen this feature in some of the popular dating apps. It works like a List component where an array of objects is passed to the Data prop, but stacks the rendered items - Deck Swiper Cards - on top of each other and allows for swipe interactions. There's several Triggers that can be used to take Action when the swiper is engaged.

Style Properties

Style properties allow you to customize the look and feel of the component. Combinations of styles applied to components can be saved as Stylesheets to easily reuse styles throughout your app. Styles can also be set dynamically using Variables. To learn more about all the different styling properties and how they work, take a look at Intro to Styling.

Configuration Properties

PropertyDescription
Component NameTo alter the name of the component. The name is reflected in the Components tree. Defaults to Deck Swiper.
Infinite swipingWhether to infinitely loop through cards or not
Vertical swipe enabledTo enable the cards to be swiped vertically.
Horizontal swipe enabledTo enable the cards to be swiped horizontally.
Start card indexIndex of the card to start swiping from
Visible card countNumber of cards visible behind (and including) the current card

Data Properties

PropertyDescription
DataAn array of data to present as cards

Conditional Display

You can conditionally display a component based on a given condition. Learn more about conditionally displaying components in the Conditional Display doc.

Triggers

Actions have access to the card index variable when used within the provided Triggers.

Trigger nameDescription
On Index ChangedRuns the Actions when swiped
On End ReachedRuns the Actions when the end of the cards is reached
On Swiped LeftRuns the Actions when swiped left
On Swiped RightRuns the Actions when swiped right
On Swiped UpRuns the Actions when swiped up
On Swiped DownRuns the Actions when swiped down
On SwipeRuns the Actions when the element is swiped
On Start SwipeRuns the Actions when swipe starts
On End SwipeRuns the Actions when swipe ends

Actions

PropertyDescription
Swipe CardSwipes the top card in a the Deck Swiper