Swipeable

Provides both swipeable icon or text. Mostly used for ListItems.

Preview

Swipeable has two modes:

  • Action on click

  • Action on release

Code sample

Action on click - with icons

Action on click - with text

Action on release - with icon

Action on release - with text

Props

Swipeable

prop

type

description

leftContent

renderable

(optional) left content visible during pull action

rightContent

renderable

(optional) right content visible during pull action

leftButtons

renderable[]

(optional) array of buttons, first being the innermost; ignored if leftContent present

rightButtons

renderable[]

(optional) array of buttons, first being the innermost; ignored if rightContent present

leftActionActivationDistance

integer

(optional) minimum swipe distance to activate left action

onLeftActionRelease

function

(optional) user has swiped beyond leftActionActivationDistance and released

rightActionActivationDistance

integer

(optional) minimum swipe distance to activate right action

onRightActionRelease

function

(optional) user has swiped beyond rightActionActivationDistance and released

leftButtonWidth

integer

(optional) resting visible peek of each left button after buttons are swiped open

rightButtonWidth

integer

(optional) resting visible peek of each right button after buttons are swiped open

onRef

function

(optional) receive swipeable component instance reference

onPanAnimatedValueRef

function

(optional) receive swipeable pan Animated.ValueXY reference for upstream animations

Swipeable.Icon

Name

Type

Description

icon

string

name of icon to show

*

set color with any of info, warning, error, success

onPress

function

action to trigger on press

left

boolean

used in leftButtons or leftContent

Swipeable.Text

Name

Type

Description

children

string

text to show

*

set color with any of info, warning, error, success

onPress

function

action to trigger on press

left

boolean

used in leftButtons or leftContent

Last updated