Skip to content

wiseqingyang/react-native-draggable-floating

Folders and files

NameName
Last commit message
Last commit date

Latest commit

d6db3bc · Jul 3, 2024

History

10 Commits
Jul 3, 2024
Jun 30, 2023
Feb 26, 2023
Feb 19, 2024
Feb 26, 2023
Feb 26, 2023
Feb 26, 2023
Feb 26, 2023
Feb 26, 2023
Feb 26, 2023
Feb 26, 2023
Jun 30, 2023
Feb 27, 2023
Jun 30, 2023
Feb 26, 2023
Jul 3, 2024
Jul 3, 2024
Feb 26, 2023
Jun 30, 2023
Jul 3, 2024

Repository files navigation

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

Prop Type Default Description
stickyLeft boolean false Whether to stick to the left side of its parent.
initialOffsetY number 0 The initial offset of the widget from the top of its parent. If negative, the offset will be the bottom.
onPositionChange (x: number; y: number) => void undefined call 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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published