> For AI agents: the complete documentation index is available at https://react-native-swipe-deck.pages.dev/llms.txt, the full documentation bundle is available at https://react-native-swipe-deck.pages.dev/llms-full.txt.

# Installation

Install the package and its required React Native gesture/animation peer dependencies:


```sh [npm]
npm @react-native-motion-kit/swipe-deck react-native-gesture-handler react-native-reanimated react-native-worklets
```

```sh [yarn]
yarn @react-native-motion-kit/swipe-deck react-native-gesture-handler react-native-reanimated react-native-worklets
```

```sh [pnpm]
pnpm @react-native-motion-kit/swipe-deck react-native-gesture-handler react-native-reanimated react-native-worklets
```

```sh [bun]
bun @react-native-motion-kit/swipe-deck react-native-gesture-handler react-native-reanimated react-native-worklets
```

```sh [deno]
deno @react-native-motion-kit/swipe-deck npm:react-native-gesture-handler npm:react-native-reanimated npm:react-native-worklets
```

## Minimum Versions

| Package                        | Minimum  |
| ------------------------------ | -------- |
| `react`                        | `18.0.0` |
| `react-native`                 | `0.75.0` |
| `react-native-gesture-handler` | `2.24.0` |
| `react-native-reanimated`      | `4.0.0`  |
| `react-native-worklets`        | `0.5.0`  |

## React Native Setup

Follow the official setup guides for your React Native or Expo version:

- [React Native Reanimated getting started](https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/getting-started/)
- [React Native Gesture Handler installation](https://docs.swmansion.com/react-native-gesture-handler/docs/fundamentals/installation)

In Babel config, make sure `react-native-worklets/plugin` is the last Babel
plugin.

```js title="babel.config.js"
module.exports = {
  presets: ['module:@react-native/babel-preset'],
  plugins: ['react-native-worklets/plugin'],
};
```

Gesture Handler also expects your app surface to be under
`GestureHandlerRootView`.

```tsx
import { GestureHandlerRootView } from 'react-native-gesture-handler';

export function AppRoot() {
  return <GestureHandlerRootView style={{ flex: 1 }}>{/* app */}</GestureHandlerRootView>;
}
```
