> For the complete documentation index, see [llms.txt](https://openai.gitbook.io/code-cheatsheets/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://openai.gitbook.io/code-cheatsheets/react/all/react_native/gestures.md).

# Gestures

## Button

```jsx
<Button
  onPress={() => {
    alert('You tapped the button!');
  }}
  title="Press Me"
  color="#841584"
/>
```

onLongPress

onPress

## Touchables

Create your own buttons with touchable

* [**TouchableHighlight**](https://facebook.github.io/react-native/docs/touchablehighlight) anywhere you would use a button or link on web. The view's background will be darkened when the user presses down on the button.
* [**TouchableNativeFeedback**](https://facebook.github.io/react-native/docs/touchablenativefeedback) on Android to display ink surface reaction ripples that respond to the user's touch.
* [**TouchableOpacity**](https://facebook.github.io/react-native/docs/touchableopacity) reduce opacity of button on click
* [**TouchableWithoutFeedback**](https://facebook.github.io/react-native/docs/touchablewithoutfeedback) handles tap without feedback

## Scrolling

[ScrollView](https://facebook.github.io/react-native/docs/scrollview)

### Props

* pagingEnabled
* `maximumZoomScale` and `minimumZoomScale` props use gestures to zoom in and out

```jsx
import React, { Component } from 'react';
import { ScrollView, Image, Text } from 'react-native';

export default class IScrolledDownAndWhatHappenedNextShockedMe extends Component {
  render() {
      return (
        <ScrollView>
          <Text style={{fontSize:96}}>Scroll me plz</Text>
          <Image source={{uri: "https://facebook.github.io/react-native/img/tiny_logo.png", width: 64, height: 64}} />
        </ScrollView>
      );
  }
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://openai.gitbook.io/code-cheatsheets/react/all/react_native/gestures.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
