GithubHelp home page GithubHelp logo

xiangjiejie / react-native-scrollvertical Goto Github PK

View Code? Open in Web Editor NEW

This project forked from accforgit/react-native-scrollvertical

1.0 2.0 0.0 36 KB

:lemon: 纯JavaScript实现仿京东app首页 京东快报 上下滚屏效果

License: MIT License

JavaScript 100.00%

react-native-scrollvertical's Introduction

react-native-scrollVertical

纯JavaScript实现仿京东app首页 京东快报 上下滚屏效果

image

Installation

npm install --save https://github.com/accforgit/react-native-scrollVertical.git

Basic Usage

import React, { Component } from 'react'

import ScrollVertical from './scrollVertical'

export default class Index extends Component {
  constructor(props) {
    super(props)
  }

  render() {
    // 测试数据
    let data = []
    for(let i=4; i--; ) {
      data.push({content: 'animatedScroll ' + i})
    }
    return (
      <Temp
        data={data}
        delay={1000}
        duration={300}
        scrollHeight={40}
        scrollStyle={{backgroundColor:'skyblue', paddingLeft:20}}
        textStyle={{color:'#666', fontSize:20}}/>
    )
  }
}

Properties

Props Default Type Description
data [] array(object{content}) 上下滚屏的数据条目
delay 500 number 每一次滚动切换之前延迟的时间,单位为 ms
duration 500 number 每一次滚动切换的持续时间,单位为 ms
scrollHeight 32 number 滚屏高度
scrollStyle null style 滚屏样式
textStyle null style 滚屏文字样式

react-native-scrollvertical's People

Contributors

accforgit avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.