Skip to content

Repository files navigation

React Native Indicate Preview

react-native-indicate

Enhanced ScrollView with elements indicating scrollable overflow.

Installation

npm i react-native-indicate

Usage

importReactfrom'react'import{Text}from'react-native'importIndicatefrom'react-native-indicate'export()=><Indicate><Text>Hello Plugin</Text></Indicate>

Options

By default scrolling is enabled for both directions (horizontal and vertical) if there is overflow. The behaviour of Indicate can further be configured with the following props.

PropDescriptionDefaultType
horizontalAllow horizontal scrolling.trueboolean
verticalAllow vertical scrolling.trueboolean
fadeWidthWidth of the fade effect used to indicate overflow.20number
appearanceOffsetIn this range scrollable overflow will be ignored.10number
wrapperStyleAdded to the wrapping SafeAreaView component.nullStyleProp
styleStyles added to the ScrollView.nullStyleProp
innerViewStyleStyles added to the inner ScrollView (both directions).nullStyleProp
contentContainerStylePassed to the ScrollView as well.nullStyleProp
gradientImported image representing a gradient for the left element.nullstring, ImageSourcePropType
anyAll other props passed will be passed down to the ScrollView.nullScrollViewProps

If you need the gradient colored differently, pass a PNG with height 1 pixel and width matching the fadeWidth as the gradient prop. Same format as would be passed to this: <Image source={require('../gradient.png')} />. Support for react-native-linear-gradient (which requires native dependencies) is planned.

About

Enhanced ScrollView with elements indicating scrollable overflow.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Used by

Contributors

Languages