Launch Week Day 2: Introducing Reports: An Extensible Reporting Framework for Socket Data.Learn More
Socket
Book a DemoSign in
Socket

@rn-components-kit/deck-swiper

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rn-components-kit/deck-swiper

Deck Swiper helps you evaluate one option at a time, instead of selecting from a set of options.

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

DeckSwiper

NPM version

English | 中文

Deck Swiper helps you evaluate one option at a time, instead of selecting from a set of options.

How to use

npm install @rn-components-kit/deck-swiper --save
PreviewCode
Demo1 Code

Props

Methods

Reference

Props

style

Allow you to customizr style

TypeRequiredDefault
objectno-

data

Data source of cards

TypeRequiredDefault
T[]yes-

cardWidth

Width of card (it is important to help calculate animation)

TypeRequiredDefault
numberyes-

cardHeight

Height of card (it is important to help calculate animation)

TypeRequiredDefault
numberyes-

renderCard

(params: {item: T, index: number}) => React.ReactElement | null

Takes an item from data and renders it into the swiper

TypeRequiredDefault
functionyes-

renderBottom

() => React.ReactElement | null

When all cards are swiped, it will be called and returns bottom layer component

TypeRequiredDefault
functionno-

onSwipeLeft

(from: number, to: number) => void

A callback will be triggered when card is swiped left

TypeRequiredDefault
functionno() => {}

onSwipeRight

(from: number, to: number) => void

A callback will be triggered when card is swiped right

TypeRequiredDefault
functionno() => {}

onBeginDragging

() => void

A callback will be triggered when you begin to drag DeckSwiper

TypeRequiredDefault
functionno() => {}

onEndDragging

() => void

A callback will be triggered when dragging operation ends

TypeRequiredDefault
functionno() => {}

Methods

prev

prev()

Swipes to previous card

next

next()

Swipes to next card

Keywords

react-native

FAQs

Package last updated on 25 Jun 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts