TouchableHighlight

React Native 5 min min read Updated: Jul 26, 2026 Beginner
TouchableHighlight
Beginner Topic 12 of 30

TouchableHighlight

TouchableHighlight is a touchable component in React Native that darkens or changes the background color of its child when pressed, commonly used for list items and menu rows.

Basic Usage

javascript import { TouchableHighlight, Text } from 'react-native'; console.log('Pressed')} > List Item

Customizing the Underlay Color

The underlayColor prop defines the background color displayed briefly beneath the component while it is being pressed.

javascript Settings

Requiring a Single Child

Unlike TouchableOpacity, TouchableHighlight requires exactly one direct child element, meaning multiple elements must be wrapped inside a single View.

TouchableHighlight vs TouchableOpacity

TouchableHighlight provides a background highlight effect, making it well suited for list rows, while TouchableOpacity provides a fade effect, better suited for standalone buttons.

TouchableHighlight vs Pressable

Pressable can replicate the same highlight behavior using its function-based style prop, and is generally recommended for new projects due to its additional flexibility and unified API.

javascript ({ backgroundColor: pressed ? '#ddd' : '#fff' })} onPress={handlePress} > List Item

Conclusion

TouchableHighlight remains a useful component for creating highlighted list interactions in React Native, though many modern codebases are transitioning toward Pressable for greater flexibility and consistency.

Get Newsletter

Subscibe to our newsletter and we will notify you about the newest updates on Edugators