Swipable Item

This is a View that can be swiped left or right to perform an action on swipe or reveal Swipeable Item Buttons which have their own. Typically you'd use it inside a Swipeable List, but it can also be used by itself.

How to use

By default, there are no buttons, and "On Swiped Right" and "On Swiped Left" actions are used when swiping.

There are config props titled "Left/Right Swipe Configuration" where you can set up what is shown under the item in either direction.

Any children of this view are rendered on the top swipeable part and Swipeable Item Buttons can be nested inside the Swipeable Item to be shown below.

One thing to note is that if you have Actions set on one of the Triggers for the Swipeable Item or any of the direction-specific props configured, you cannot then use Swipeable Item Buttons inside of it which are configured for the same swipe direction (left/right). That means you can combine the two, but they have to be configured for opposite directions.

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

Basic

PropertyDescription
Component nameThe name of the component as it appears in the Screen's component tree
Swipe Activation PercentagePercentage of swipe completion needed to trigger onSwipedLeft or onSwipedRight. Overriden by 'Left activation value' and 'Right activation value'
Close on pressWhether the view should be closed/dismissed when pressed

Advanced

PropertyDescription
Left activation valueThe X translation value on the left side that triggers onSwipedRight when surpassed (positive value). Defaults to 80% of half view width
Right activation valueThe X translation value on the right side that triggers onSwipedLeft when surpassed (negative value). Defaults to negative 80% of half view width
Stop left swipeThe maximum X translation value that is swipable to the left (negative value). Defaults to negative half view width
Stop right swipeThe maximum X translation value that is swipable to the right (positive value). Defaults to half view width
Change thresholdChange the sensitivity of the swipe on the view
Swipe to close percentageWhat % of the left/right does the user need to swipe past to trigger the view closing
Swipe to open percentageWhat % of the left/right does the user need to swipe past to trigger the view opening
Swing velocity contributionDescribes how much the ending velocity of the gesture affects whether the swipe will result in the item being closed or open. A velocity factor of 0 (the default) means that the velocity will have no bearing on whether the swipe settles on a closed or open position and it'll just take into consideration the swipeToOpenPercent. Ideal values for this prop tend to be between 5 and 15
Left open valueThe X translation value on the left side that that the right swipe snaps to (positive value). Defaults to half view width
Right open valueThe X translation value on the right side that that the left swipe snaps to (negative value). Defaults to negative half view width
FrictionControls the 'bounciness' of the swipe animation

Left swipe

PropertyDescription
Left swipe colorColor of text and icon displayed under the view when swiping left
Left swipe icon sizeSize of icon displayed under the view when swiping left
Left swipe titleTitle displayed under the view when swiping left
Left swipe iconIcon displayed under the view when swiping left
Left swipe backgroundBackground color displayed under the view when swiping left

Right swipe

PropertyDescription
Right swipe colorColor of text and icon displayed under the view when swiping right
Right swipe icon sizeSize of icon displayed under the view when swiping right
Right swipe titleTitle displayed under the view when swiping right
Right swipe iconIcon displayed under the view when swiping right
Right swipe backgroundBackground color displayed under the view when swiping right

Data Properties

PropertyDescription
Disable left swipeWhether left swipe is enabled or not
Disable right swipeWhether right swipe is enabled or not

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

TriggerDescription
On swiped rightRuns the Actions when swiped right
On swiped leftRuns the Actions when swiped left