1.3.0 • Published 2 years ago

react-js-pull-to-refresh v1.3.0

Weekly downloads
2,080
License
MIT
Repository
github
Last release
2 years ago

react-js-pull-to-refresh

Pull to refresh with react

Support all mobile(iOS, Android) and Desktop browser (Chrome, Safari, firefox, Opera, QQ, UC, ... etc)

npm version license codebeat badge size

npm.io

Demo

See the demo in action at https://echoulen.github.io/react-pull-to-refresh/

Installation

npm install react-js-pull-to-refresh --save

or

yarn add react-js-pull-to-refresh

Props

NameTypeRequired
pullDownContentJSX.Elementtrue
releaseContentJSX.Elementtrue
refreshContentJSX.Elementtrue
pullDownThresholdnumbertrue
onRefreshPromisetrue
triggerHeightnumber or 'auto'false
backgroundColorstringfalse
startInvisiblebooleanfalse

Usage

Import PullToRefresh

import {PullToRefresh} from "react-js-pull-to-refresh";

Import default content (optional)

import {PullDownContent, ReleaseContent, RefreshContent} from "react-js-pull-to-refresh";

Sample

<PullToRefresh
  pullDownContent={<PullDownContent />}
  releaseContent={<ReleaseContent />}
  refreshContent={<RefreshContent />}
  pullDownThreshold={200}
  onRefresh={this.onRefresh}
  triggerHeight={50}
  backgroundColor='white'
  startInvisible={true}
>
  <div style={{height: '150vh', textAlign: 'center'}}>
    <div>PullToRefresh</div>
  </div>
</PullToRefresh>

Sample code in typescript

Link

Contributing

npm run dev
1.3.0

2 years ago

1.2.3

3 years ago

1.2.2

5 years ago

1.2.1

5 years ago

1.2.0

6 years ago

1.1.0

6 years ago

1.0.10

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago

0.2.4

6 years ago

0.2.3

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.6

6 years ago

0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago