0.3.2 • Published 3 months ago

react-native-draggable-floating v0.3.2

Weekly downloads
-
License
MIT
Repository
github
Last release
3 months ago

react-native-draggable-floating

A simple draggable widget sticky to left or right side of its parent. Using the react-native-reanimated and react-native-gesture-handler.

demo

Installation

npm install react-native-draggable-floating

Usage

import DraggableView from 'react-native-draggable-floating';

<DraggableView>
  <View />
</DraggableView>

Props

PropTypeDefaultDescription
stickyLeftbooleanfalseWhether to stick to the left side of its parent.
initialOffsetYnumber0The initial offset of the widget from the top of its parent. If negative, the offset will be the bottom.
onPositionChange(x: number; y: number) => voidundefinedcall back when you release the widget and after the sticky animation, it's useful when you want to save the position when recreating the container view

License

MIT


Made with create-react-native-library

0.3.2

3 months ago

0.3.0

10 months ago

0.2.0

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago