Vue NativeVue Native
Guide
Components
Composables
Navigation
  • iOS
  • Android
  • macOS
GitHub
Guide
Components
Composables
Navigation
  • iOS
  • Android
  • macOS
GitHub
  • Layout

    • VView
    • VScrollView
    • VSafeArea
    • VKeyboardAvoiding
  • Text & Input

    • VText
    • VInput
  • Interactive

    • VButton
    • VPressable
    • VSwitch
    • VSlider
    • VSegmentedControl
    • VCheckbox
    • VRadio
    • VDropdown
    • VRefreshControl
  • Media

    • VImage
    • VWebView
    • VVideo
  • Lists

    • VList
    • VFlatList
    • VSectionList
  • Feedback

    • VActivityIndicator
    • VProgressBar
    • VAlertDialog
    • VActionSheet
    • VModal
    • VErrorBoundary
  • Transition & State

    • VTransition & VTransitionGroup
    • KeepAlive
    • VSuspense
  • Navigation

    • VNavigationBar
    • VTabBar
  • System

    • VStatusBar
    • VPicker
  • macOS

    • VToolbar
    • VSplitView
    • VOutlineView

VPressable

A generic pressable container component. Like VButton but without any default styling or built-in text label. Wraps any children in a touchable container with configurable press feedback.

On iOS this maps to a custom TouchableView (UIView subclass) with opacity animation. On Android this maps to a TouchableView (FlexboxLayout subclass).

Usage

<VPressable
  :style="{ padding: 16 }"
  :onPress="handlePress"
  :activeOpacity="0.6"
>
  <VView :style="{ flexDirection: 'row', alignItems: 'center' }">
    <VImage :source="{ uri: iconUrl }" :style="{ width: 24, height: 24 }" />
    <VText :style="{ marginLeft: 8 }">Press me</VText>
  </VView>
</VPressable>

Props

PropTypeDefaultDescription
styleStyleProp--Layout + appearance styles
disabledbooleanfalseDisable press interactions
activeOpacitynumber0.7Opacity when pressed (0.0 to 1.0)
onPressFunction--Callback fired on tap
onPressInFunction--Callback fired when the touch starts
onPressOutFunction--Callback fired when the touch ends
onLongPressFunction--Callback fired on long press (~500ms)
accessibilityLabelstring--Accessible description
accessibilityRolestring--Accessibility role
accessibilityHintstring--Additional accessibility context
accessibilityStateobject--Accessibility state

VPressable vs VButton

FeatureVButtonVPressable
Press eventsonPress, onLongPressonPress, onPressIn, onPressOut, onLongPress
Press-in/out feedbackNoYes
StylingSameSame

Use VPressable when you need press-in/out events (e.g. for custom highlight animations) or when building custom interactive components.

Example

<script setup>
import { ref } from '@thelacanians/vue-native-runtime'

const isPressed = ref(false)
</script>

<template>
  <VPressable
    :style="{
      padding: 20,
      backgroundColor: isPressed ? '#e0e0e0' : '#f5f5f5',
      borderRadius: 12,
    }"
    :onPress="() => console.log('Pressed!')"
    :onPressIn="() => isPressed = true"
    :onPressOut="() => isPressed = false"
    :onLongPress="() => console.log('Long pressed!')"
  >
    <VText :style="{ fontSize: 16, fontWeight: '600' }">
      Custom Pressable
    </VText>
    <VText :style="{ fontSize: 14, color: '#666', marginTop: 4 }">
      With press-in/out visual feedback
    </VText>
  </VPressable>
</template>

Notes

  • All press callbacks (onPress, onPressIn, onPressOut, onLongPress) are disabled when disabled is true.
  • Like VButton, VPressable uses props for press handlers (:onPress), not Vue events (@press).
Edit this page
Last Updated: 2/28/26, 11:24 PM
Contributors: Abdul Hamid, Claude Opus 4.6
Prev
VButton
Next
VSwitch