Skip to main content

ListItem

List item component to render inside a List component
(code example)

info

This component extends TouchableOpacity props.

Usage​

Live Editor
<ListItem onPress={() => console.log('pressed')}>
 <Text grey10 text60 marginL-10>The item</Text>
</ListItem>
Result
Loading...

API​

containerElement​

The container element to wrap the ListItem React.ComponentType<ListItemProps | TouchableOpacityProps>

containerStyle​

Additional styles for the top container ViewStyle

height​

the list item height ViewStyle['height']

onLongPress​

action for when long pressing the item () => void

onPress​

action for when pressing the item () => void

style​

The inner element style ViewStyle

testID​

The test id for e2e tests string

underlayColor​

The inner element pressed backgroundColor string