# react-native-draggable-floating

> A floating draggable container for react-native

Latest version **0.3.3** (published 2024-07-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-native-draggable-floating
pnpm add react-native-draggable-floating
yarn add react-native-draggable-floating
bun add react-native-draggable-floating
```

## Health

**Score 35/100 (D)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; has provenance; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.3 |
| Published | 2024-07-03 |
| First published | 2023-02-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >= 16.0.0 |
| Dependencies | 0 |
| Unpacked size | 32.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 6 |
| Author | wiseqingyang |
| Maintainers | wiseqingyang |
| Keywords | react-native, ios, android |

## Links

- npm: https://www.npmjs.com/package/react-native-draggable-floating
- Repository: https://github.com/wiseqingyang/react-native-draggable-floating
- Homepage: https://github.com/wiseqingyang/react-native-draggable-floating#readme
- Issues: https://github.com/wiseqingyang/react-native-draggable-floating/issues
- npm.io page: https://npm.io/package/react-native-draggable-floating

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 0.3.3 (latest) — 2024-07-03
- 0.3.2 — 2024-02-19
- 0.3.0 — 2023-06-30
- 0.2.0 — 2023-02-27
- 0.0.2 — 2023-02-24
- 0.0.1 — 2023-02-23

## README

# 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](./demo.gif)
## Installation

```sh
npm install react-native-draggable-floating
```

## Usage

```js
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](https://github.com/callstack/react-native-builder-bob)

---
_Source: https://npm.io/package/react-native-draggable-floating · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
