Skip to content

Latest commit

 

History

History
63 lines (49 loc) · 1.56 KB

README.md

File metadata and controls

63 lines (49 loc) · 1.56 KB

react-native-drag-expand

Bring your own UI, headless drag expand view.

npm version npm downloads GitHub license PRs Welcome



Demo

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>
  )
}