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
Property | Description |
---|---|
Component Name | To alter the name of the component. The name is reflected in the Components tree. Defaults to Deck Swiper. |
Infinite swiping | Whether to infinitely loop through cards or not |
Vertical swipe enabled | To enable the cards to be swiped vertically. |
Horizontal swipe enabled | To enable the cards to be swiped horizontally. |
Start card index | Index of the card to start swiping from |
Visible card count | Number of cards visible behind (and including) the current card |
Data Properties
Property | Description |
---|---|
Data | An 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 name | Description |
---|---|
On Index Changed | Runs the Actions when swiped |
On End Reached | Runs the Actions when the end of the cards is reached |
On Swiped Left | Runs the Actions when swiped left |
On Swiped Right | Runs the Actions when swiped right |
On Swiped Up | Runs the Actions when swiped up |
On Swiped Down | Runs the Actions when swiped down |
On Swipe | Runs the Actions when the element is swiped |
On Start Swipe | Runs the Actions when swipe starts |
On End Swipe | Runs the Actions when swipe ends |
Actions
Property | Description |
---|---|
Swipe Card | Swipes the top card in a the Deck Swiper |
Updated 2 months ago