Skip to content
Docs
Components
Touchables
TouchableOpacity

TouchableOpacity

Component that is based on react native TouchableOpacity component.

Import

import { TouchableOpacity } from 'react-native-ficus-ui';

Usage

EDITABLE EXAMPLE
<VStack spacing={10}>
  <TouchableOpacity onPress={() => console.log('Pressed')}>
    <Text>Test</Text>
  </TouchableOpacity>
  <TouchableOpacity
    bg="red.300"
    p="xl"
    borderRadius="xl"
    onPress={() => console.log('Pressed')}
  >
    <Text>Test</Text>
  </TouchableOpacity>
</VStack>

Props

Extends every Box props and react native TouchableOpacity component.

https://reactnative.dev/docs/touchableopacity#props (opens in a new tab)