{"id":22887266,"url":"https://github.com/appandflow/react-native-touchable","last_synced_at":"2025-05-07T11:15:28.139Z","repository":{"id":57098283,"uuid":"91037596","full_name":"AppAndFlow/react-native-touchable","owner":"AppAndFlow","description":"React-Native button helper library","archived":false,"fork":false,"pushed_at":"2018-08-20T22:29:48.000Z","size":201,"stargazers_count":46,"open_issues_count":2,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-07T11:15:20.842Z","etag":null,"topics":["button","react-native","react-native-component"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AppAndFlow.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-05-12T01:18:23.000Z","updated_at":"2021-12-28T18:43:01.000Z","dependencies_parsed_at":"2022-08-20T16:51:08.397Z","dependency_job_id":null,"html_url":"https://github.com/AppAndFlow/react-native-touchable","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AppAndFlow%2Freact-native-touchable","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AppAndFlow%2Freact-native-touchable/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AppAndFlow%2Freact-native-touchable/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AppAndFlow%2Freact-native-touchable/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AppAndFlow","download_url":"https://codeload.github.com/AppAndFlow/react-native-touchable/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252865696,"owners_count":21816309,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["button","react-native","react-native-component"],"created_at":"2024-12-13T20:32:08.350Z","updated_at":"2025-05-07T11:15:28.101Z","avatar_url":"https://github.com/AppAndFlow.png","language":"JavaScript","readme":"# @appandflow/touchable\n\n[![npm (scoped)](https://img.shields.io/npm/v/@appandflow/touchable.svg)](https://www.npmjs.com/package/@appandflow/touchable) [![Travis branch](https://img.shields.io/travis/AppAndFlow/react-native-touchable/master.svg)](https://travis-ci.org/AppAndFlow/react-native-touchable)\n\nA wrapper for react-native `Touchable` components to simplify the API and make the Android ripple effect work by default. Based on [react-native-gesture-handler](https://github.com/kmagiera/react-native-gesture-handler).\n\n## Why use this library?\n\nIt lets you import only component and forget about which platform you are using, it will default to the best behavior for the platform.\n\n## Installation\n\n`yarn add @appandflow/touchable`\n\n## Usage\n\n`import Touchable from '@appandflow/touchable';`\n\nIf you are using things like `ScrollView` make sure to use the one included in react-native-gesture-handler for better interactions.\n\n## Props\n\n### feedback\n\n* opacity\n* highlight\n* none\n\n### disabled\n\nYou can disable the touch by passing disabled `true`. Default `false`.\n\n### native [Android only]\n\nTODO: This doesn't work anymore as of V2\n\nToggle whether or not to use the ripple effects on Android. By default this is true on Android.\n\n**If false don't forget to add a feedback**\n\n## History\n\n### v2.0.0\n\n* This version now uses [react-native-gesture-handler](https://github.com/kmagiera/react-native-gesture-handler). If you are using Expo it is included by default, otherwise you will need to install it. For a version that uses RN primitives use @^1.0.0.\n\n* native={false} is not currently implemented.\n\n* onLongPress is no longer supported, use LongPressGestureHandler from react-native-gesture-handler instead.\n\n## Example\n\nTake a look at example folder. [Link](https://github.com/AppAndFlow/react-native-touchable/blob/master/example)\n\n```js\nimport React, { Component } from 'react';\nimport { Text, View, Alert } from 'react-native';\nimport Touchable from '@appandflow/touchable';\n\nclass App extends Component {\n  _handleAlert = feedback =\u003e {\n    Alert.alert(`You touch the feedback: ${feedback}`);\n  };\n  render() {\n    return (\n      \u003cView style={styles.container}\u003e\n        \u003cTouchable\n          feedback=\"opacity\"\n          style={[styles.button, styles.opacity]}\n          onPress={() =\u003e this._handleAlert('opacity')}\n        \u003e\n          \u003cText style={styles.buttonText}\u003eOPACITY\u003c/Text\u003e\n        \u003c/Touchable\u003e\n        \u003cTouchable\n          feedback=\"highlight\"\n          style={[styles.button, styles.highlight]}\n          onPress={() =\u003e this._handleAlert('highlight')}\n        \u003e\n          \u003cText style={styles.buttonText}\u003eHIGHLIGHT\u003c/Text\u003e\n        \u003c/Touchable\u003e\n        \u003cTouchable\n          feedback=\"none\"\n          style={[styles.button, styles.none]}\n          onPress={() =\u003e this._handleAlert('none')}\n        \u003e\n          \u003cText style={styles.buttonText}\u003eNONE\u003c/Text\u003e\n        \u003c/Touchable\u003e\n      \u003c/View\u003e\n    );\n  }\n}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappandflow%2Freact-native-touchable","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fappandflow%2Freact-native-touchable","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappandflow%2Freact-native-touchable/lists"}