Skip to content

TouchBlocker is a React Native and React Native Web component that helps blocking the user from interacting with children components.

License

Notifications You must be signed in to change notification settings

youedd/react-native-touch-blocker

Repository files navigation

react-native-touch-blocker

GitHub Workflow Status npm typescript License TS-Standard - Typescript Standard Style Guide

TouchBlocker is a React Native and React Native Web component that helps blocking the user from interacting with children components.

Install

npm install react-native-touch-blocker --save

or

yarn add react-native-touch-blocker

Demo

Test it online on Expo

Usage

<TouchBlocker>
  <Button
    title="Can't Touch This 😎"
    onPress={() => null}
  />
</TouchBlocker>

Props

Prop Default Type Description
enableTouchEvents false Boolean Allow children to receive touch events

The TouchBlocker component also supports React Native View Props.

About

TouchBlocker is a React Native and React Native Web component that helps blocking the user from interacting with children components.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published