Actions

Pressable

Makes any React Native content tappable, with press feedback built in.

iOSReact Native PressableAndroidReact Native PressableReact Native tier — renders anywhere
Pressable on iOS
iOSReact Native Pressable
Pressable on Android
AndroidReact Native Pressable

Import

ts
import {Pressable} from '@hzblj/kara-ui'

Props

React Native's Pressable, styled through sx like a Box: it springs down to 96% while pressed and takes touches 8 points past its edges. The React Native tier — it needs no host.

Also takes the React Native `sx` props.

PropTypeDefaultDescription
childrenReactNode—

The pressable content.

disabledbooleanfalse

Ignores presses — no onPress, no haptic, no spring.

hapticboolean | Hapticfalse

Played on press. true is a light impact; a name picks the haptic, e.g. selection for a choice.

onPress() => void—

Called when the press is released, after the haptic plays.

testIDstring—

Test identifier, forwarded to the view.

children
ReactNode

The pressable content.

disabledfalse
boolean

Ignores presses — no onPress, no haptic, no spring.

hapticfalse
boolean | Haptic

Played on press. true is a light impact; a name picks the haptic, e.g. selection for a choice.

onPress
() => void

Called when the press is released, after the haptic plays.

testID
string

Test identifier, forwarded to the view.

Platform notes

  • Springs to 96 % while held and takes touches 8 points past its edges.
  • haptic is true for a light impact, or any haptic by name. iOS prepares it on press-in.