Skip to main content

Overview

The Pressable component detects press interactions on any child component. Uniwind provides className prop support for styling this component.

Styling Convention

For style props: Use regular Tailwind classes directly (e.g., className="p-4").For non-style props (like color): Use the accent- prefix (e.g., colorClassName="accent-bg-blue-500").

Uniwind Bindings

className
string
Maps to the style prop. Use any Tailwind utility classes.

Usage Example

import { Pressable, Text } from 'react-native'

<Pressable
  className="bg-blue-500 px-6 py-3 rounded-lg active:opacity-80"
  onPress={() => console.log('Pressed')}
>
  <Text className="text-white text-center font-semibold">Press me</Text>
</Pressable>
I