Skip to content

Repository files navigation

rn-draggable

a react native wrapper to drag any component

Installation

npm install rn-draggable

Usage

import { Draggable } from 'rn-draggable';

// ...

<Draggable>
<YourCompomemt />
</Draggable>

props

Draggable accept the following props
-onGrant: Function (fired when the draggable component is initiated)
-onMove: Function (fired when the draggable component is being dragged)
-onRelease: Function (fired when the draggable component is released).

Example

const myFunction=()=>{...}
<Draggable onGrant={myFunction}>
{/*...*/}
</Draggable>

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT


Made with create-react-native-library

About

No description, website, or topics provided.

Resources

Code of conduct

Contributing

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages