All Projects → a289459798 → react-native-sideslip

a289459798 / react-native-sideslip

Licence: other
可以让任意view支持侧滑菜单

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to react-native-sideslip

simple gesture detector
Easy to use, reliable and lightweight gesture detector for Flutter apps, exposing simple API for basic gestures
Stars: ✭ 26 (+44.44%)
Mutual labels:  swipe
swipeable-button
Android Swipeable button like in iOS unlock screen. Made by Stfalcon
Stars: ✭ 83 (+361.11%)
Mutual labels:  swipe
react-gallery-carousel
Mobile-friendly gallery carousel 🎠 with server side rendering, lazy loading, fullscreen, thumbnails, touch, mouse emulation, RTL, keyboard navigation and customisations.
Stars: ✭ 178 (+888.89%)
Mutual labels:  swipe
gestures
A library for normalized events and gesture for desktop and mobile.
Stars: ✭ 31 (+72.22%)
Mutual labels:  swipe
skeleton-carousel
Carousel component. Horizontal and vertical swipe navigation
Stars: ✭ 31 (+72.22%)
Mutual labels:  swipe
Swipeable-View
Simple editActionsForRowAt functionality, written on SWIFTUI
Stars: ✭ 37 (+105.56%)
Mutual labels:  swipe
react-native-swipe-close-image
A React native swipe to close image
Stars: ✭ 18 (+0%)
Mutual labels:  swipe
HBHybridCollectionView
Instead for SwipeTableView when using collection view.
Stars: ✭ 14 (-22.22%)
Mutual labels:  swipe
slider-manager
simple wrapper to create sliders focused on animations
Stars: ✭ 28 (+55.56%)
Mutual labels:  swipe
XamarinFormsGesture
Xamarin Form Gesture Effects
Stars: ✭ 85 (+372.22%)
Mutual labels:  swipe
react-native-viewpager-carousel
a flexible viewpager library with carousel functionality
Stars: ✭ 39 (+116.67%)
Mutual labels:  swipe
XamarinItemTouchHelper
Basic example of using ItemTouchHelper to add drag & drop and swipe-to-dismiss to RecyclerView for Xamarin
Stars: ✭ 35 (+94.44%)
Mutual labels:  swipe
keeporsweep.net
💻🔀🗑️ Randomly declutter your digital life!
Stars: ✭ 54 (+200%)
Mutual labels:  swipe
vue-bottom-navigation
Vue bottom navigation
Stars: ✭ 56 (+211.11%)
Mutual labels:  swipe
flutter widget
Flutter视频播放,自适应高度轮播图,视频作为背景的登录页面
Stars: ✭ 36 (+100%)
Mutual labels:  swipe
Flare
A full-fledged unofficial Angular-based Tinder web client
Stars: ✭ 23 (+27.78%)
Mutual labels:  swipe
react-tinder-card
A npm react module for making react elements swipeable like in the dating app tinder.
Stars: ✭ 184 (+922.22%)
Mutual labels:  swipe
react-native-slideable-calendar-strip
A react native calendar strip that support swipe!
Stars: ✭ 86 (+377.78%)
Mutual labels:  swipe
SPStorkController
Now playing controller from Apple Music, Mail & Podcasts Apple's apps.
Stars: ✭ 2,515 (+13872.22%)
Mutual labels:  swipe
swipe-keyboard
Swype type keyboard module for simple-keyboard
Stars: ✭ 32 (+77.78%)
Mutual labels:  swipe

react-native-sideslip

可以让任意view支持侧滑菜单,处理事件

    

##作者

QQ: 289459798 QQ群: 161263093

欢迎更多的喜欢开源的小伙伴加入

安装

依赖项目 react-native-interactable

> npm install react-native-sideslip --save

使用方式

<Sideslip.View ref={(r) => this.sideslipView = r} style={styles.container}>
    ...
    <Sideslip.Row
        sideslipView={() => this.sideslipView}
        menus={[]}>
        ....
    </Sideslip.Row>
    ...
</Sideslip.View>

示例(listview支持侧滑删除)

import Sideslip from 'react-native-sideslip'

<Sideslip.View ref={(r) => this.sideslipView = r} style={styles.container}>
    <FlatList
        style={{flex: 1}}
        data={this.state.list}
        keyExtractor={(item, key) => key + ""}
        renderItem={({item, index}) =>

            <Sideslip.Row
                key={index}
                sideslipView={() => this.sideslipView}
                menus={[{
                    title: "关注", color: '#f5f5f5', textStyle: {color: '#333'}, onPress: (view) => {
                    }
                }, {
                    title: "删除", color: 'red', type: 'delete', onPress: (view) => {
                        let list = this.state.list.slice();
                        list.splice(index, 1);
                        this.setState({list: list});
                    }
                }]}
            >
                <View style={{
                    flex: 1,
                    backgroundColor: '#FFF',
                    height: 50,
                    alignItems: 'center',
                    justifyContent: 'center'
                }}>
                    <Text>{item}</Text>
                </View>
            </Sideslip.Row>
        }
        ItemSeparatorComponent={() => <View
            style={{height: StyleSheet.hairlineWidth, backgroundColor: '#e2e2e2'}}/>}

    >

    </FlatList>
</Sideslip.View>

Sideslip.View

必须在最外层用这个view包起来,不然无法处理一些点击事件

Sideslip.Row

需侧滑菜单功能的需要用该view包起来

属性

属性名 类型 备注
sideslipView func 必须属性,需要返回Sideslip.View 的ref
anim bool 是否启用动画,仅对type=delete时生效,默认为false
menus array title(string,菜单名称), color(string,背景颜色), textStyle(文本样式), type(string, 目前只有delete,删除功能必须传delete), onPress(func)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].