Skip to main content

TouchablePlatform

Content

Platform-friendly touchable button which relies on Pressable. Used in PrimaryButton and RadioButton.

Params

Extends PressableProps and additionally adds next properties

NameTypeRequiredDefault valueDescription
styleViewStyle or ViewStyle[]FalseUndefinedStyle of button
highlightColorstring or OpaqueColorValueFalsePlatformColorsIOS.quaternarySystemFill on iOS and PlatformColorsAndroid.primaryLight on AndroidHighlight color used as ripple color on Android and when pressed background color on iOS

Usage example

    <TouchablePlatform style={styles.container} onPress={onButtonPress}>
<Text style={labelStyle} numberOfLines={1}>
{label}
</Text>
</TouchablePlatform>