• English
  • Installation

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

    npm
    yarn
    pnpm
    bun
    deno
    npm @react-native-motion-kit/swipe-deck react-native-gesture-handler react-native-reanimated react-native-worklets

    Minimum Versions

    PackageMinimum
    react18.0.0
    react-native0.75.0
    react-native-gesture-handler2.24.0
    react-native-reanimated4.0.0
    react-native-worklets0.5.0

    React Native Setup

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

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

    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.

    import { GestureHandlerRootView } from 'react-native-gesture-handler';
    
    export function AppRoot() {
      return <GestureHandlerRootView style={{ flex: 1 }}>{/* app */}</GestureHandlerRootView>;
    }