0.0.5 • Published 5 years ago

react-native-seamless-scroll v0.0.5

Weekly downloads
1
License
ISC
Repository
-
Last release
5 years ago

Screenshots

react-naitve-SeamlessScroll

react-native 简单的无缝平滑滚动组件 用于横向或纵向的平滑滚动

Browsers

  • support ios and android

Install

    npm install react-native-seamless-scroll
    yarn add react-native-seamless-scroll

Usage

import { SeamlessScroll } from 'react-native-seamless-scrolls';

<SeamlessScroll scrolltime={8000} direction='row' meter={20} styles={{ width: 320, flexDirection: 'row' }}>
  <View style={{ paddingRight: 20 }}>
    <Text>
      测试公告内容是否能正常播放,会不会卡条!
    </Text>
  </View>
  <View>
    <Text style={styles.noticeText}>
      测试公告内容是否能正常播放,会不会卡条!
    </Text>
  </View>
</SeamlessScroll>

API

属性说明类型默认值
direction必选 方向 默认纵向'vertical' 横向'row'stringvertical
meter选填 调节参数(在滚动元素有padding或margin时做对应调节,或处理ios和android兼容调节)number0
styles必选 对应的滚动适口宽度或高度(width或height)一般为滚动元素总高(宽)度Objectnull
scrolltime滚动一个周期所需时间(毫秒)number5000