react-native-drag-expand
v0.4.0
Published
Component to use drag gesture to expand or collapse a view size.
Downloads
106
Maintainers
Readme
react-native-drag-expand
Installing react-native-drag-expand
To install react-native-drag-expand:
npm install react-native-drag-expand
Next, add the view:
import {DragExpandView} from 'react-native-drag-expand'
import {Text, View} from 'react-native'
export default function App() {
return (
// Styled view container
<View>
<DragExpandView>
<DragExpandView.Collapsed>
<View>
<Text>Your collapsed content</Text>
</View>
</DragExpandView.Collapsed>
<DragExpandView.Expanded>
<View>
<Text>Your expanded content</Text>
</View>
</DragExpandView.Expanded>
<DragExpandView.Knob>
<View>
<Text>Your drag hold point view</Text>
</View>
</DragExpandView.Knob>
</DragExpandView>
</View>
)
}