1.1.1 • Published 6 years ago

react-native-autoreheight-webview v1.1.1

Weekly downloads
7
License
MIT
Repository
github
Last release
6 years ago

Version License

react-native-autoreheight-webview

An auto resize content height webview for React Native. Pure JavaScript,and easy to use.
(rn >= 0.44)

install

yarn add react-native-autoreheight-webview

or

npm install react-native-autoreheight-webview

Demo1

showtime1

see more in Example.js

Demo2

showtime1

see more in Example2.js

Basic Usage

<AutoResizeHeightWebView
                defaultHeight={200}
                style={{backgroundColor:'white'}}
                AnimationDuration={500} 
                source={{uri: 'http://www.ftchinese.com/story/001075607'}}/> 

Props

props namedefaultdesciption
defaultHeight100default Height
style{}webviewStyle
needAutoResetHeighttrueyou can reset Height manually
AnimationDuration500animation duration
sourcenulljust like ReactNative's Webview
needAnimatetrueshow animate or not when resetting height

And all props in React Native's WebView Component

Functions

function namedesciption
resetHeightreset height to show all manually
resetSmallHeightreset Height to default height manually

Feel free to add issues or feature requests