Components

PressableFeedback

Animated press feedback wrapper with scale and highlight effects.

iOSAndroid
Preview PressableFeedback on your device

Scan with Expo Go

Download Expo Go, then scan the QR code to preview native components.

Installation

pnpm dlx @docyrus/cli add @docyrus/rn-pressable-feedback
Required Packages(1 package)
pnpm add react-native-reanimated

Usage

import { PressableFeedback } from '@/components/docyrus-native/pressable-feedback';

<PressableFeedback onPress={() => console.log('pressed')}>
  <Text>Press me</Text>
</PressableFeedback>

API Reference

PropTypeDefaultDescription
childrenReactNode—Content to wrap
feedbackVariant'scale' | 'scale-highlight' | 'none''scale-highlight'Type of press feedback
scaleValuenumber0.97Scale factor on press
highlightOpacitynumber0.7Opacity on press (scale-highlight only)
disabledbooleanfalseDisable interactions
classNamestring—Additional classes

All PressableProps are also accepted.

Type Exports

TypeDescription
PressableFeedbackPropsProps for PressableFeedback
FeedbackVariant'scale' | 'scale-highlight' | 'none'

On this page