react-native-gesture-handler

  • Version 1.10.3
  • Published
  • 1.34 MB
  • 5 dependencies
  • MIT license

Install

npm i react-native-gesture-handler
yarn add react-native-gesture-handler
pnpm add react-native-gesture-handler

Overview

Experimental implementation of a new declarative API for gesture handling in react-native

Index

Variables

Functions

Classes

Interfaces

Type Aliases

Variables

variable Directions

const Directions: {
readonly RIGHT: 1;
readonly LEFT: 2;
readonly UP: 4;
readonly DOWN: 8;
};

    variable DrawerLayoutAndroid

    const DrawerLayoutAndroid: any;

      variable FlatList

      const FlatList: any;

        variable FlingGestureHandler

        const FlingGestureHandler: any;

          variable ForceTouchGestureHandler

          const ForceTouchGestureHandler: any;

            variable LongPressGestureHandler

            const LongPressGestureHandler: any;

              variable NativeViewGestureHandler

              const NativeViewGestureHandler: any;

                variable PanGestureHandler

                const PanGestureHandler: any;

                  variable PinchGestureHandler

                  const PinchGestureHandler: any;

                    variable RawButton

                    const RawButton: any;

                      variable RotationGestureHandler

                      const RotationGestureHandler: any;

                        variable ScrollView

                        const ScrollView: any;

                          variable State

                          const State: {
                          readonly UNDETERMINED: 0;
                          readonly FAILED: 1;
                          readonly BEGAN: 2;
                          readonly CANCELLED: 3;
                          readonly ACTIVE: 4;
                          readonly END: 5;
                          };

                            variable Switch

                            const Switch: any;

                              variable TapGestureHandler

                              const TapGestureHandler: any;

                                variable TextInput

                                const TextInput: any;

                                  variable TouchableWithoutFeedback

                                  const TouchableWithoutFeedback: any;

                                    Functions

                                    function createNativeWrapper

                                    createNativeWrapper: <P>(
                                    Component: any,
                                    config?: Readonly<NativeViewGestureHandlerProps>
                                    ) => any;

                                      function gestureHandlerRootHOC

                                      gestureHandlerRootHOC: <P>(Component: any, containerStyles?: any) => any;

                                        Classes

                                        class BaseButton

                                        class BaseButton extends React.Component<BaseButtonProps> {}

                                          constructor

                                          constructor(props: BaseButtonProps);

                                            method render

                                            render: () => any;

                                              class BorderlessButton

                                              class BorderlessButton extends React.Component<BorderlessButtonProps> {}

                                                constructor

                                                constructor(props: BorderlessButtonProps);

                                                  property defaultProps

                                                  static defaultProps: { activeOpacity: number; borderless: boolean };

                                                    method render

                                                    render: () => any;

                                                      class DrawerLayout

                                                      class DrawerLayout extends Component<DrawerLayoutProps, DrawerLayoutState> {}

                                                        constructor

                                                        constructor(props: DrawerLayoutProps);

                                                          property closeDrawer

                                                          closeDrawer: (options?: DrawerMovementOption) => void;

                                                            property defaultProps

                                                            static defaultProps: {
                                                            drawerWidth: number;
                                                            drawerPosition: string;
                                                            useNativeAnimations: boolean;
                                                            drawerType: string;
                                                            edgeWidth: number;
                                                            minSwipeDistance: number;
                                                            overlayColor: string;
                                                            drawerLockMode: string;
                                                            enableTrackpadTwoFingerGesture: boolean;
                                                            };

                                                              property openDrawer

                                                              openDrawer: (options?: DrawerMovementOption) => void;

                                                                property positions

                                                                static positions: { Left: string; Right: string };

                                                                  method render

                                                                  render: () => any;

                                                                    method UNSAFE_componentWillUpdate

                                                                    UNSAFE_componentWillUpdate: (
                                                                    props: DrawerLayoutProps,
                                                                    state: DrawerLayoutState
                                                                    ) => void;

                                                                      class RectButton

                                                                      class RectButton extends React.Component<RectButtonProps> {}

                                                                        constructor

                                                                        constructor(props: RectButtonProps);

                                                                          property defaultProps

                                                                          static defaultProps: { activeOpacity: number; underlayColor: string };

                                                                            method render

                                                                            render: () => any;

                                                                              class Swipeable

                                                                              class Swipeable extends Component<SwipeableProps, SwipeableState> {}

                                                                                constructor

                                                                                constructor(props: SwipeableProps);

                                                                                  property close

                                                                                  close: () => void;

                                                                                    property defaultProps

                                                                                    static defaultProps: {
                                                                                    friction: number;
                                                                                    overshootFriction: number;
                                                                                    useNativeAnimations: boolean;
                                                                                    };

                                                                                      property openLeft

                                                                                      openLeft: () => void;

                                                                                        property openRight

                                                                                        openRight: () => void;

                                                                                          method render

                                                                                          render: () => any;

                                                                                            method UNSAFE_componentWillUpdate

                                                                                            UNSAFE_componentWillUpdate: (
                                                                                            props: SwipeableProps,
                                                                                            state: SwipeableState
                                                                                            ) => void;

                                                                                              class TouchableHighlight

                                                                                              class TouchableHighlight extends Component<
                                                                                              TouchableHighlightProps & GenericTouchableProps,
                                                                                              State
                                                                                              > {}
                                                                                              • TouchableHighlight follows RN's implementation

                                                                                              constructor

                                                                                              constructor(props: any);

                                                                                                property defaultProps

                                                                                                static defaultProps: {
                                                                                                activeOpacity: number;
                                                                                                delayPressOut: number;
                                                                                                underlayColor: string;
                                                                                                delayLongPress: number;
                                                                                                extraButtonProps: { rippleColor: string };
                                                                                                };

                                                                                                  property hasPressHandler

                                                                                                  hasPressHandler: () => ((event: any) => void) & (() => void);

                                                                                                    property hideUnderlay

                                                                                                    hideUnderlay: () => void;

                                                                                                      property onStateChange

                                                                                                      onStateChange: (_from: number, to: number) => void;

                                                                                                        property showUnderlay

                                                                                                        showUnderlay: () => void;

                                                                                                          method render

                                                                                                          render: () => any;

                                                                                                            method renderChildren

                                                                                                            renderChildren: () => any;

                                                                                                              class TouchableOpacity

                                                                                                              class TouchableOpacity extends Component<
                                                                                                              TouchableOpacityProps & GenericTouchableProps
                                                                                                              > {}
                                                                                                              • TouchableOpacity bases on timing animation which has been used in RN's core

                                                                                                              property defaultProps

                                                                                                              static defaultProps: {
                                                                                                              activeOpacity: number;
                                                                                                              delayLongPress: number;
                                                                                                              extraButtonProps: { rippleColor: string };
                                                                                                              };

                                                                                                                property getChildStyleOpacityWithDefault

                                                                                                                getChildStyleOpacityWithDefault: () => number;

                                                                                                                  property onStateChange

                                                                                                                  onStateChange: (_from: number, to: number) => void;

                                                                                                                    property opacity

                                                                                                                    opacity: any;

                                                                                                                      property setOpacityTo

                                                                                                                      setOpacityTo: (value: number, duration: number) => void;

                                                                                                                        method render

                                                                                                                        render: () => any;

                                                                                                                          Interfaces

                                                                                                                          interface BaseButtonProps

                                                                                                                          interface BaseButtonProps extends RawButtonProps {}

                                                                                                                            property onActiveStateChange

                                                                                                                            onActiveStateChange?: (active: boolean) => void;

                                                                                                                              property onPress

                                                                                                                              onPress?: (pointerInside: boolean) => void;

                                                                                                                                property style

                                                                                                                                style?: StyleProp<ViewStyle>;

                                                                                                                                  property testID

                                                                                                                                  testID?: string;

                                                                                                                                    interface BorderlessButtonProps

                                                                                                                                    interface BorderlessButtonProps extends BaseButtonProps {}

                                                                                                                                      property activeOpacity

                                                                                                                                      activeOpacity?: number;

                                                                                                                                        property borderless

                                                                                                                                        borderless?: boolean;

                                                                                                                                          interface DrawerLayoutProps

                                                                                                                                          interface DrawerLayoutProps {}

                                                                                                                                            property contentContainerStyle

                                                                                                                                            contentContainerStyle?: StyleProp<ViewStyle>;

                                                                                                                                              property drawerBackgroundColor

                                                                                                                                              drawerBackgroundColor?: string;

                                                                                                                                                property drawerContainerStyle

                                                                                                                                                drawerContainerStyle?: StyleProp<ViewStyle>;

                                                                                                                                                  property drawerLockMode

                                                                                                                                                  drawerLockMode?: DrawerLockMode;

                                                                                                                                                    property drawerPosition

                                                                                                                                                    drawerPosition?: DrawerPosition;

                                                                                                                                                      property drawerType

                                                                                                                                                      drawerType?: DrawerType;

                                                                                                                                                        property drawerWidth

                                                                                                                                                        drawerWidth?: number;

                                                                                                                                                          property edgeWidth

                                                                                                                                                          edgeWidth?: number;

                                                                                                                                                            property enableTrackpadTwoFingerGesture

                                                                                                                                                            enableTrackpadTwoFingerGesture?: boolean;

                                                                                                                                                              property hideStatusBar

                                                                                                                                                              hideStatusBar?: boolean;

                                                                                                                                                                property keyboardDismissMode

                                                                                                                                                                keyboardDismissMode?: DrawerKeyboardDismissMode;

                                                                                                                                                                  property minSwipeDistance

                                                                                                                                                                  minSwipeDistance?: number;

                                                                                                                                                                    property onDrawerClose

                                                                                                                                                                    onDrawerClose?: () => void;

                                                                                                                                                                      property onDrawerOpen

                                                                                                                                                                      onDrawerOpen?: () => void;

                                                                                                                                                                        property onDrawerSlide

                                                                                                                                                                        onDrawerSlide?: (position: number) => void;

                                                                                                                                                                          property onDrawerStateChanged

                                                                                                                                                                          onDrawerStateChanged?: (newState: DrawerState, drawerWillShow: boolean) => void;

                                                                                                                                                                            property onGestureRef

                                                                                                                                                                            onGestureRef?: (ref: PanGestureHandler) => void;

                                                                                                                                                                              property overlayColor

                                                                                                                                                                              overlayColor?: string;

                                                                                                                                                                                property renderNavigationView

                                                                                                                                                                                renderNavigationView: (progressAnimatedValue: Animated.Value) => React.ReactNode;

                                                                                                                                                                                  property statusBarAnimation

                                                                                                                                                                                  statusBarAnimation?: StatusBarAnimation;

                                                                                                                                                                                    property useNativeAnimations

                                                                                                                                                                                    useNativeAnimations?: boolean;

                                                                                                                                                                                      interface FlingGestureHandlerProps

                                                                                                                                                                                      interface FlingGestureHandlerProps
                                                                                                                                                                                      extends BaseGestureHandlerProps<FlingGestureHandlerEventPayload> {}

                                                                                                                                                                                        property direction

                                                                                                                                                                                        direction?: number;

                                                                                                                                                                                          property numberOfPointers

                                                                                                                                                                                          numberOfPointers?: number;

                                                                                                                                                                                            interface ForceTouchGestureHandlerProps

                                                                                                                                                                                            interface ForceTouchGestureHandlerProps
                                                                                                                                                                                            extends BaseGestureHandlerProps<ForceTouchGestureHandlerEventPayload> {}

                                                                                                                                                                                              property feedbackOnActivation

                                                                                                                                                                                              feedbackOnActivation?: boolean;

                                                                                                                                                                                                property maxForce

                                                                                                                                                                                                maxForce?: number;

                                                                                                                                                                                                  property minForce

                                                                                                                                                                                                  minForce?: number;

                                                                                                                                                                                                    interface GestureEvent

                                                                                                                                                                                                    interface GestureEvent<ExtraEventPayloadT = Record<string, unknown>> {}

                                                                                                                                                                                                      property nativeEvent

                                                                                                                                                                                                      nativeEvent: Readonly<GestureEventPayload & ExtraEventPayloadT>;

                                                                                                                                                                                                        interface GestureEventPayload

                                                                                                                                                                                                        interface GestureEventPayload {}

                                                                                                                                                                                                          property handlerTag

                                                                                                                                                                                                          handlerTag: number;

                                                                                                                                                                                                            property numberOfPointers

                                                                                                                                                                                                            numberOfPointers: number;

                                                                                                                                                                                                              property state

                                                                                                                                                                                                              state: ValueOf<typeof State>;

                                                                                                                                                                                                                interface HandlerStateChangeEvent

                                                                                                                                                                                                                interface HandlerStateChangeEvent<ExtraEventPayloadT = Record<string, unknown>> {}

                                                                                                                                                                                                                  property nativeEvent

                                                                                                                                                                                                                  nativeEvent: Readonly<HandlerStateChangeEventPayload & ExtraEventPayloadT>;

                                                                                                                                                                                                                    interface HandlerStateChangeEventPayload

                                                                                                                                                                                                                    interface HandlerStateChangeEventPayload {}

                                                                                                                                                                                                                      property handlerTag

                                                                                                                                                                                                                      handlerTag: number;

                                                                                                                                                                                                                        property numberOfPointers

                                                                                                                                                                                                                        numberOfPointers: number;

                                                                                                                                                                                                                          property oldState

                                                                                                                                                                                                                          oldState: ValueOf<typeof State>;

                                                                                                                                                                                                                            property state

                                                                                                                                                                                                                            state: ValueOf<typeof State>;

                                                                                                                                                                                                                              interface LongPressGestureHandlerProps

                                                                                                                                                                                                                              interface LongPressGestureHandlerProps
                                                                                                                                                                                                                              extends BaseGestureHandlerProps<LongPressGestureHandlerEventPayload> {}

                                                                                                                                                                                                                                property maxDist

                                                                                                                                                                                                                                maxDist?: number;

                                                                                                                                                                                                                                  property minDurationMs

                                                                                                                                                                                                                                  minDurationMs?: number;

                                                                                                                                                                                                                                    interface NativeViewGestureHandlerProps

                                                                                                                                                                                                                                    interface NativeViewGestureHandlerProps
                                                                                                                                                                                                                                    extends BaseGestureHandlerProps<NativeViewGestureHandlerPayload> {}

                                                                                                                                                                                                                                      property disallowInterruption

                                                                                                                                                                                                                                      disallowInterruption?: boolean;

                                                                                                                                                                                                                                        property shouldActivateOnStart

                                                                                                                                                                                                                                        shouldActivateOnStart?: boolean;

                                                                                                                                                                                                                                          interface PanGestureHandlerProps

                                                                                                                                                                                                                                          interface PanGestureHandlerProps
                                                                                                                                                                                                                                          extends BaseGestureHandlerProps<PanGestureHandlerEventPayload> {}

                                                                                                                                                                                                                                            property activeOffsetX

                                                                                                                                                                                                                                            activeOffsetX?: number | number[];

                                                                                                                                                                                                                                              property activeOffsetY

                                                                                                                                                                                                                                              activeOffsetY?: number | number[];

                                                                                                                                                                                                                                                property avgTouches

                                                                                                                                                                                                                                                avgTouches?: boolean;

                                                                                                                                                                                                                                                  property enableTrackpadTwoFingerGesture

                                                                                                                                                                                                                                                  enableTrackpadTwoFingerGesture?: boolean;

                                                                                                                                                                                                                                                    property failOffsetX

                                                                                                                                                                                                                                                    failOffsetX?: number | number[];

                                                                                                                                                                                                                                                      property failOffsetY

                                                                                                                                                                                                                                                      failOffsetY?: number | number[];

                                                                                                                                                                                                                                                        property maxDeltaX

                                                                                                                                                                                                                                                        maxDeltaX?: number;
                                                                                                                                                                                                                                                        • Deprecated

                                                                                                                                                                                                                                                          use failOffsetX

                                                                                                                                                                                                                                                        property maxDeltaY

                                                                                                                                                                                                                                                        maxDeltaY?: number;
                                                                                                                                                                                                                                                        • Deprecated

                                                                                                                                                                                                                                                          use failOffsetY

                                                                                                                                                                                                                                                        property maxPointers

                                                                                                                                                                                                                                                        maxPointers?: number;

                                                                                                                                                                                                                                                          property minDeltaX

                                                                                                                                                                                                                                                          minDeltaX?: number;
                                                                                                                                                                                                                                                          • Deprecated

                                                                                                                                                                                                                                                            use activeOffsetX

                                                                                                                                                                                                                                                          property minDeltaY

                                                                                                                                                                                                                                                          minDeltaY?: number;
                                                                                                                                                                                                                                                          • Deprecated

                                                                                                                                                                                                                                                            use activeOffsetY

                                                                                                                                                                                                                                                          property minDist

                                                                                                                                                                                                                                                          minDist?: number;

                                                                                                                                                                                                                                                            property minOffsetX

                                                                                                                                                                                                                                                            minOffsetX?: number;
                                                                                                                                                                                                                                                            • Deprecated

                                                                                                                                                                                                                                                              use activeOffsetX

                                                                                                                                                                                                                                                            property minOffsetY

                                                                                                                                                                                                                                                            minOffsetY?: number;
                                                                                                                                                                                                                                                            • Deprecated

                                                                                                                                                                                                                                                              use failOffsetY

                                                                                                                                                                                                                                                            property minPointers

                                                                                                                                                                                                                                                            minPointers?: number;

                                                                                                                                                                                                                                                              property minVelocity

                                                                                                                                                                                                                                                              minVelocity?: number;

                                                                                                                                                                                                                                                                property minVelocityX

                                                                                                                                                                                                                                                                minVelocityX?: number;

                                                                                                                                                                                                                                                                  property minVelocityY

                                                                                                                                                                                                                                                                  minVelocityY?: number;

                                                                                                                                                                                                                                                                    interface PinchGestureHandlerProps

                                                                                                                                                                                                                                                                    interface PinchGestureHandlerProps
                                                                                                                                                                                                                                                                    extends BaseGestureHandlerProps<PinchGestureHandlerEventPayload> {}

                                                                                                                                                                                                                                                                      interface RawButtonProps

                                                                                                                                                                                                                                                                      interface RawButtonProps extends NativeViewGestureHandlerProps {}

                                                                                                                                                                                                                                                                        property exclusive

                                                                                                                                                                                                                                                                        exclusive?: boolean;

                                                                                                                                                                                                                                                                          property rippleColor

                                                                                                                                                                                                                                                                          rippleColor?: any;

                                                                                                                                                                                                                                                                            interface RectButtonProps

                                                                                                                                                                                                                                                                            interface RectButtonProps extends BaseButtonProps {}

                                                                                                                                                                                                                                                                              property activeOpacity

                                                                                                                                                                                                                                                                              activeOpacity?: number;

                                                                                                                                                                                                                                                                                property underlayColor

                                                                                                                                                                                                                                                                                underlayColor?: string;

                                                                                                                                                                                                                                                                                  interface RotationGestureHandlerProps

                                                                                                                                                                                                                                                                                  interface RotationGestureHandlerProps
                                                                                                                                                                                                                                                                                  extends BaseGestureHandlerProps<RotationGestureHandlerEventPayload> {}

                                                                                                                                                                                                                                                                                    interface TapGestureHandlerProps

                                                                                                                                                                                                                                                                                    interface TapGestureHandlerProps
                                                                                                                                                                                                                                                                                    extends BaseGestureHandlerProps<TapGestureHandlerEventPayload> {}

                                                                                                                                                                                                                                                                                      property maxDelayMs

                                                                                                                                                                                                                                                                                      maxDelayMs?: number;

                                                                                                                                                                                                                                                                                        property maxDeltaX

                                                                                                                                                                                                                                                                                        maxDeltaX?: number;

                                                                                                                                                                                                                                                                                          property maxDeltaY

                                                                                                                                                                                                                                                                                          maxDeltaY?: number;

                                                                                                                                                                                                                                                                                            property maxDist

                                                                                                                                                                                                                                                                                            maxDist?: number;

                                                                                                                                                                                                                                                                                              property maxDurationMs

                                                                                                                                                                                                                                                                                              maxDurationMs?: number;

                                                                                                                                                                                                                                                                                                property minPointers

                                                                                                                                                                                                                                                                                                minPointers?: number;

                                                                                                                                                                                                                                                                                                  property numberOfTaps

                                                                                                                                                                                                                                                                                                  numberOfTaps?: number;

                                                                                                                                                                                                                                                                                                    Type Aliases

                                                                                                                                                                                                                                                                                                    type BaseButtonProperties

                                                                                                                                                                                                                                                                                                    type BaseButtonProperties = BaseButtonProps;

                                                                                                                                                                                                                                                                                                      type BorderlessButtonProperties

                                                                                                                                                                                                                                                                                                      type BorderlessButtonProperties = BorderlessButtonProps;

                                                                                                                                                                                                                                                                                                        type Directions

                                                                                                                                                                                                                                                                                                        type Directions = typeof Directions[keyof typeof Directions];

                                                                                                                                                                                                                                                                                                          type DrawerKeyboardDismissMode

                                                                                                                                                                                                                                                                                                          type DrawerKeyboardDismissMode = 'none' | 'on-drag';

                                                                                                                                                                                                                                                                                                            type DrawerLayoutAndroid

                                                                                                                                                                                                                                                                                                            type DrawerLayoutAndroid = typeof DrawerLayoutAndroid;

                                                                                                                                                                                                                                                                                                              type DrawerLockMode

                                                                                                                                                                                                                                                                                                              type DrawerLockMode = 'unlocked' | 'locked-closed' | 'locked-open';

                                                                                                                                                                                                                                                                                                                type DrawerPosition

                                                                                                                                                                                                                                                                                                                type DrawerPosition = 'left' | 'right';

                                                                                                                                                                                                                                                                                                                  type DrawerState

                                                                                                                                                                                                                                                                                                                  type DrawerState = 'Idle' | 'Dragging' | 'Settling';

                                                                                                                                                                                                                                                                                                                    type DrawerType

                                                                                                                                                                                                                                                                                                                    type DrawerType = 'front' | 'back' | 'slide';

                                                                                                                                                                                                                                                                                                                      type FlatList

                                                                                                                                                                                                                                                                                                                      type FlatList<ItemT> = React.ComponentType<
                                                                                                                                                                                                                                                                                                                      RNFlatListProps<ItemT> & NativeViewGestureHandlerProps & React.RefAttributes<any>
                                                                                                                                                                                                                                                                                                                      > & {
                                                                                                                                                                                                                                                                                                                      scrollToEnd: (params?: { animated?: boolean }) => void;
                                                                                                                                                                                                                                                                                                                      scrollToIndex: (params: {
                                                                                                                                                                                                                                                                                                                      animated?: boolean;
                                                                                                                                                                                                                                                                                                                      index: number;
                                                                                                                                                                                                                                                                                                                      viewOffset?: number;
                                                                                                                                                                                                                                                                                                                      viewPosition?: number;
                                                                                                                                                                                                                                                                                                                      }) => void;
                                                                                                                                                                                                                                                                                                                      scrollToItem: (params: {
                                                                                                                                                                                                                                                                                                                      animated?: boolean;
                                                                                                                                                                                                                                                                                                                      item: ItemT;
                                                                                                                                                                                                                                                                                                                      viewPosition?: number;
                                                                                                                                                                                                                                                                                                                      }) => void;
                                                                                                                                                                                                                                                                                                                      scrollToOffset: (params: { animated?: boolean; offset: number }) => void;
                                                                                                                                                                                                                                                                                                                      };

                                                                                                                                                                                                                                                                                                                        type FlingGestureHandler

                                                                                                                                                                                                                                                                                                                        type FlingGestureHandler = typeof FlingGestureHandler;

                                                                                                                                                                                                                                                                                                                          type FlingGestureHandlerEventPayload

                                                                                                                                                                                                                                                                                                                          type FlingGestureHandlerEventPayload = {
                                                                                                                                                                                                                                                                                                                          x: number;
                                                                                                                                                                                                                                                                                                                          y: number;
                                                                                                                                                                                                                                                                                                                          absoluteX: number;
                                                                                                                                                                                                                                                                                                                          absoluteY: number;
                                                                                                                                                                                                                                                                                                                          };

                                                                                                                                                                                                                                                                                                                            type FlingGestureHandlerGestureEvent

                                                                                                                                                                                                                                                                                                                            type FlingGestureHandlerGestureEvent = GestureEvent<FlingGestureHandlerEventPayload>;

                                                                                                                                                                                                                                                                                                                              type FlingGestureHandlerProperties

                                                                                                                                                                                                                                                                                                                              type FlingGestureHandlerProperties = FlingGestureHandlerProps;

                                                                                                                                                                                                                                                                                                                                type FlingGestureHandlerStateChangeEvent

                                                                                                                                                                                                                                                                                                                                type FlingGestureHandlerStateChangeEvent = HandlerStateChangeEvent<FlingGestureHandlerEventPayload>;

                                                                                                                                                                                                                                                                                                                                  type ForceTouchGestureHandler

                                                                                                                                                                                                                                                                                                                                  type ForceTouchGestureHandler = typeof ForceTouchGestureHandler & {
                                                                                                                                                                                                                                                                                                                                  forceTouchAvailable: boolean;
                                                                                                                                                                                                                                                                                                                                  };

                                                                                                                                                                                                                                                                                                                                    type ForceTouchGestureHandlerEventPayload

                                                                                                                                                                                                                                                                                                                                    type ForceTouchGestureHandlerEventPayload = {
                                                                                                                                                                                                                                                                                                                                    x: number;
                                                                                                                                                                                                                                                                                                                                    y: number;
                                                                                                                                                                                                                                                                                                                                    absoluteX: number;
                                                                                                                                                                                                                                                                                                                                    absoluteY: number;
                                                                                                                                                                                                                                                                                                                                    force: number;
                                                                                                                                                                                                                                                                                                                                    };

                                                                                                                                                                                                                                                                                                                                      type ForceTouchGestureHandlerGestureEvent

                                                                                                                                                                                                                                                                                                                                      type ForceTouchGestureHandlerGestureEvent = GestureEvent<ForceTouchGestureHandlerEventPayload>;

                                                                                                                                                                                                                                                                                                                                        type ForceTouchGestureHandlerProperties

                                                                                                                                                                                                                                                                                                                                        type ForceTouchGestureHandlerProperties = ForceTouchGestureHandlerProps;

                                                                                                                                                                                                                                                                                                                                          type ForceTouchGestureHandlerStateChangeEvent

                                                                                                                                                                                                                                                                                                                                          type ForceTouchGestureHandlerStateChangeEvent = HandlerStateChangeEvent<ForceTouchGestureHandlerEventPayload>;

                                                                                                                                                                                                                                                                                                                                            type GestureHandlerGestureEvent

                                                                                                                                                                                                                                                                                                                                            type GestureHandlerGestureEvent = GestureEvent;

                                                                                                                                                                                                                                                                                                                                              type GestureHandlerGestureEventNativeEvent

                                                                                                                                                                                                                                                                                                                                              type GestureHandlerGestureEventNativeEvent = GestureEventPayload;

                                                                                                                                                                                                                                                                                                                                                type GestureHandlerStateChangeEvent

                                                                                                                                                                                                                                                                                                                                                type GestureHandlerStateChangeEvent = HandlerStateChangeEvent;

                                                                                                                                                                                                                                                                                                                                                  type GestureHandlerStateChangeNativeEvent

                                                                                                                                                                                                                                                                                                                                                  type GestureHandlerStateChangeNativeEvent = HandlerStateChangeEventPayload;

                                                                                                                                                                                                                                                                                                                                                    type LongPressGestureHandler

                                                                                                                                                                                                                                                                                                                                                    type LongPressGestureHandler = typeof LongPressGestureHandler;

                                                                                                                                                                                                                                                                                                                                                      type LongPressGestureHandlerEventPayload

                                                                                                                                                                                                                                                                                                                                                      type LongPressGestureHandlerEventPayload = {
                                                                                                                                                                                                                                                                                                                                                      x: number;
                                                                                                                                                                                                                                                                                                                                                      y: number;
                                                                                                                                                                                                                                                                                                                                                      absoluteX: number;
                                                                                                                                                                                                                                                                                                                                                      absoluteY: number;
                                                                                                                                                                                                                                                                                                                                                      };

                                                                                                                                                                                                                                                                                                                                                        type LongPressGestureHandlerGestureEvent

                                                                                                                                                                                                                                                                                                                                                        type LongPressGestureHandlerGestureEvent = GestureEvent<LongPressGestureHandlerEventPayload>;

                                                                                                                                                                                                                                                                                                                                                          type LongPressGestureHandlerProperties

                                                                                                                                                                                                                                                                                                                                                          type LongPressGestureHandlerProperties = LongPressGestureHandlerProps;

                                                                                                                                                                                                                                                                                                                                                            type LongPressGestureHandlerStateChangeEvent

                                                                                                                                                                                                                                                                                                                                                            type LongPressGestureHandlerStateChangeEvent = HandlerStateChangeEvent<LongPressGestureHandlerEventPayload>;

                                                                                                                                                                                                                                                                                                                                                              type NativeViewGestureHandler

                                                                                                                                                                                                                                                                                                                                                              type NativeViewGestureHandler = typeof NativeViewGestureHandler;

                                                                                                                                                                                                                                                                                                                                                                type NativeViewGestureHandlerGestureEvent

                                                                                                                                                                                                                                                                                                                                                                type NativeViewGestureHandlerGestureEvent = GestureEvent<NativeViewGestureHandlerPayload>;

                                                                                                                                                                                                                                                                                                                                                                  type NativeViewGestureHandlerPayload

                                                                                                                                                                                                                                                                                                                                                                  type NativeViewGestureHandlerPayload = {
                                                                                                                                                                                                                                                                                                                                                                  pointerInside: boolean;
                                                                                                                                                                                                                                                                                                                                                                  };

                                                                                                                                                                                                                                                                                                                                                                    type NativeViewGestureHandlerProperties

                                                                                                                                                                                                                                                                                                                                                                    type NativeViewGestureHandlerProperties = NativeViewGestureHandlerProps;

                                                                                                                                                                                                                                                                                                                                                                      type NativeViewGestureHandlerStateChangeEvent

                                                                                                                                                                                                                                                                                                                                                                      type NativeViewGestureHandlerStateChangeEvent = HandlerStateChangeEvent<NativeViewGestureHandlerPayload>;

                                                                                                                                                                                                                                                                                                                                                                        type PanGestureHandler

                                                                                                                                                                                                                                                                                                                                                                        type PanGestureHandler = typeof PanGestureHandler;

                                                                                                                                                                                                                                                                                                                                                                          type PanGestureHandlerEventPayload

                                                                                                                                                                                                                                                                                                                                                                          type PanGestureHandlerEventPayload = {
                                                                                                                                                                                                                                                                                                                                                                          x: number;
                                                                                                                                                                                                                                                                                                                                                                          y: number;
                                                                                                                                                                                                                                                                                                                                                                          absoluteX: number;
                                                                                                                                                                                                                                                                                                                                                                          absoluteY: number;
                                                                                                                                                                                                                                                                                                                                                                          translationX: number;
                                                                                                                                                                                                                                                                                                                                                                          translationY: number;
                                                                                                                                                                                                                                                                                                                                                                          velocityX: number;
                                                                                                                                                                                                                                                                                                                                                                          velocityY: number;
                                                                                                                                                                                                                                                                                                                                                                          };

                                                                                                                                                                                                                                                                                                                                                                            type PanGestureHandlerGestureEvent

                                                                                                                                                                                                                                                                                                                                                                            type PanGestureHandlerGestureEvent = GestureEvent<PanGestureHandlerEventPayload>;

                                                                                                                                                                                                                                                                                                                                                                              type PanGestureHandlerProperties

                                                                                                                                                                                                                                                                                                                                                                              type PanGestureHandlerProperties = PanGestureHandlerProps;

                                                                                                                                                                                                                                                                                                                                                                                type PanGestureHandlerStateChangeEvent

                                                                                                                                                                                                                                                                                                                                                                                type PanGestureHandlerStateChangeEvent = HandlerStateChangeEvent<PanGestureHandlerEventPayload>;

                                                                                                                                                                                                                                                                                                                                                                                  type PinchGestureHandler

                                                                                                                                                                                                                                                                                                                                                                                  type PinchGestureHandler = typeof PinchGestureHandler;

                                                                                                                                                                                                                                                                                                                                                                                    type PinchGestureHandlerEventPayload

                                                                                                                                                                                                                                                                                                                                                                                    type PinchGestureHandlerEventPayload = {
                                                                                                                                                                                                                                                                                                                                                                                    scale: number;
                                                                                                                                                                                                                                                                                                                                                                                    focalX: number;
                                                                                                                                                                                                                                                                                                                                                                                    focalY: number;
                                                                                                                                                                                                                                                                                                                                                                                    velocity: number;
                                                                                                                                                                                                                                                                                                                                                                                    };

                                                                                                                                                                                                                                                                                                                                                                                      type PinchGestureHandlerGestureEvent

                                                                                                                                                                                                                                                                                                                                                                                      type PinchGestureHandlerGestureEvent = GestureEvent<PinchGestureHandlerEventPayload>;

                                                                                                                                                                                                                                                                                                                                                                                        type PinchGestureHandlerProperties

                                                                                                                                                                                                                                                                                                                                                                                        type PinchGestureHandlerProperties = PinchGestureHandlerProps;

                                                                                                                                                                                                                                                                                                                                                                                          type PinchGestureHandlerStateChangeEvent

                                                                                                                                                                                                                                                                                                                                                                                          type PinchGestureHandlerStateChangeEvent = HandlerStateChangeEvent<PinchGestureHandlerEventPayload>;

                                                                                                                                                                                                                                                                                                                                                                                            type RawButtonProperties

                                                                                                                                                                                                                                                                                                                                                                                            type RawButtonProperties = RawButtonProps;

                                                                                                                                                                                                                                                                                                                                                                                              type RectButtonProperties

                                                                                                                                                                                                                                                                                                                                                                                              type RectButtonProperties = RectButtonProps;

                                                                                                                                                                                                                                                                                                                                                                                                type RotationGestureHandler

                                                                                                                                                                                                                                                                                                                                                                                                type RotationGestureHandler = typeof RotationGestureHandler;

                                                                                                                                                                                                                                                                                                                                                                                                  type RotationGestureHandlerEventPayload

                                                                                                                                                                                                                                                                                                                                                                                                  type RotationGestureHandlerEventPayload = {
                                                                                                                                                                                                                                                                                                                                                                                                  rotation: number;
                                                                                                                                                                                                                                                                                                                                                                                                  anchorX: number;
                                                                                                                                                                                                                                                                                                                                                                                                  anchorY: number;
                                                                                                                                                                                                                                                                                                                                                                                                  velocity: number;
                                                                                                                                                                                                                                                                                                                                                                                                  };

                                                                                                                                                                                                                                                                                                                                                                                                    type RotationGestureHandlerGestureEvent

                                                                                                                                                                                                                                                                                                                                                                                                    type RotationGestureHandlerGestureEvent = GestureEvent<RotationGestureHandlerEventPayload>;

                                                                                                                                                                                                                                                                                                                                                                                                      type RotationGestureHandlerProperties

                                                                                                                                                                                                                                                                                                                                                                                                      type RotationGestureHandlerProperties = RotationGestureHandlerProps;

                                                                                                                                                                                                                                                                                                                                                                                                        type RotationGestureHandlerStateChangeEvent

                                                                                                                                                                                                                                                                                                                                                                                                        type RotationGestureHandlerStateChangeEvent = HandlerStateChangeEvent<RotationGestureHandlerEventPayload>;

                                                                                                                                                                                                                                                                                                                                                                                                          type ScrollView

                                                                                                                                                                                                                                                                                                                                                                                                          type ScrollView = typeof ScrollView & {
                                                                                                                                                                                                                                                                                                                                                                                                          scrollTo(
                                                                                                                                                                                                                                                                                                                                                                                                          y?:
                                                                                                                                                                                                                                                                                                                                                                                                          | number
                                                                                                                                                                                                                                                                                                                                                                                                          | {
                                                                                                                                                                                                                                                                                                                                                                                                          x?: number;
                                                                                                                                                                                                                                                                                                                                                                                                          y?: number;
                                                                                                                                                                                                                                                                                                                                                                                                          animated?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                          },
                                                                                                                                                                                                                                                                                                                                                                                                          x?: number,
                                                                                                                                                                                                                                                                                                                                                                                                          animated?: boolean
                                                                                                                                                                                                                                                                                                                                                                                                          ): void;
                                                                                                                                                                                                                                                                                                                                                                                                          scrollToEnd(options?: { animated: boolean }): void;
                                                                                                                                                                                                                                                                                                                                                                                                          };

                                                                                                                                                                                                                                                                                                                                                                                                            type State

                                                                                                                                                                                                                                                                                                                                                                                                            type State = typeof State[keyof typeof State];

                                                                                                                                                                                                                                                                                                                                                                                                              type Switch

                                                                                                                                                                                                                                                                                                                                                                                                              type Switch = typeof Switch;

                                                                                                                                                                                                                                                                                                                                                                                                                type TapGestureHandler

                                                                                                                                                                                                                                                                                                                                                                                                                type TapGestureHandler = typeof TapGestureHandler;

                                                                                                                                                                                                                                                                                                                                                                                                                  type TapGestureHandlerEventPayload

                                                                                                                                                                                                                                                                                                                                                                                                                  type TapGestureHandlerEventPayload = {
                                                                                                                                                                                                                                                                                                                                                                                                                  x: number;
                                                                                                                                                                                                                                                                                                                                                                                                                  y: number;
                                                                                                                                                                                                                                                                                                                                                                                                                  absoluteX: number;
                                                                                                                                                                                                                                                                                                                                                                                                                  absoluteY: number;
                                                                                                                                                                                                                                                                                                                                                                                                                  };

                                                                                                                                                                                                                                                                                                                                                                                                                    type TapGestureHandlerGestureEvent

                                                                                                                                                                                                                                                                                                                                                                                                                    type TapGestureHandlerGestureEvent = GestureEvent<TapGestureHandlerEventPayload>;

                                                                                                                                                                                                                                                                                                                                                                                                                      type TapGestureHandlerProperties

                                                                                                                                                                                                                                                                                                                                                                                                                      type TapGestureHandlerProperties = TapGestureHandlerProps;

                                                                                                                                                                                                                                                                                                                                                                                                                        type TapGestureHandlerStateChangeEvent

                                                                                                                                                                                                                                                                                                                                                                                                                        type TapGestureHandlerStateChangeEvent = HandlerStateChangeEvent<TapGestureHandlerEventPayload>;

                                                                                                                                                                                                                                                                                                                                                                                                                          type TextInput

                                                                                                                                                                                                                                                                                                                                                                                                                          type TextInput = typeof TextInput;

                                                                                                                                                                                                                                                                                                                                                                                                                            Package Files (15)

                                                                                                                                                                                                                                                                                                                                                                                                                            Dependencies (5)

                                                                                                                                                                                                                                                                                                                                                                                                                            Dev Dependencies (34)

                                                                                                                                                                                                                                                                                                                                                                                                                            Peer Dependencies (0)

                                                                                                                                                                                                                                                                                                                                                                                                                            No peer dependencies.

                                                                                                                                                                                                                                                                                                                                                                                                                            Badge

                                                                                                                                                                                                                                                                                                                                                                                                                            To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                                                                                                                                                                                                                                                                                                                                                                                                            You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/react-native-gesture-handler.

                                                                                                                                                                                                                                                                                                                                                                                                                            • Markdown
                                                                                                                                                                                                                                                                                                                                                                                                                              [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/react-native-gesture-handler)
                                                                                                                                                                                                                                                                                                                                                                                                                            • HTML
                                                                                                                                                                                                                                                                                                                                                                                                                              <a href="https://www.jsdocs.io/package/react-native-gesture-handler"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>