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

VActionSheet

A native action sheet component that slides up from the bottom of the screen. Maps to UIAlertController (.actionSheet style) on iOS and an AlertDialog with an item list on Android.

VActionSheet is a non-visual component -- it renders a zero-size hidden placeholder and presents the native sheet when visible becomes true.

Usage

<VActionSheet
  :visible="showSheet"
  title="Choose an option"
  :actions="[
    { label: 'Edit' },
    { label: 'Share' },
    { label: 'Delete', style: 'destructive' },
    { label: 'Cancel', style: 'cancel' },
  ]"
  @action="onAction"
  @cancel="showSheet = false"
/>

Props

PropTypeDefaultDescription
visiblebooleanfalseShow or hide the action sheet
titlestring—Optional title displayed at the top
messagestring—Optional message displayed below the title
actionsActionSheetAction[][]Array of action configurations

ActionSheetAction

interface ActionSheetAction {
  label: string
  style?: 'default' | 'cancel' | 'destructive'
}
  • 'default' -- standard action appearance
  • 'cancel' -- cancel action (separated on iOS, triggers @cancel event)
  • 'destructive' -- red/destructive appearance

If no action has style: 'cancel', a "Cancel" button is automatically added.

Events

EventPayloadDescription
@action{ label: string }Fired when a non-cancel action is pressed
@cancel—Fired when the cancel action is pressed

Example

<script setup>
import { ref } from 'vue'

const showSheet = ref(false)
const lastAction = ref('')

function handleAction(e) {
  lastAction.value = e.label
  showSheet.value = false
}
</script>

<template>
  <VView :style="styles.container">
    <VButton :style="styles.button" :onPress="() => showSheet = true">
      <VText :style="styles.buttonText">Show Options</VText>
    </VButton>

    <VText v-if="lastAction" :style="styles.result">
      Selected: {{ lastAction }}
    </VText>

    <VActionSheet
      :visible="showSheet"
      title="Photo Options"
      message="What would you like to do with this photo?"
      :actions="[
        { label: 'Save to Library' },
        { label: 'Copy Link' },
        { label: 'Delete Photo', style: 'destructive' },
        { label: 'Cancel', style: 'cancel' },
      ]"
      @action="handleAction"
      @cancel="showSheet = false"
    />
  </VView>
</template>

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

const styles = createStyleSheet({
  container: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center',
    gap: 16,
  },
  button: {
    backgroundColor: '#007AFF',
    paddingHorizontal: 24,
    paddingVertical: 12,
    borderRadius: 8,
  },
  buttonText: {
    color: '#fff',
    fontSize: 16,
    fontWeight: '600',
  },
  result: {
    fontSize: 14,
    color: '#666',
  },
})
</script>

Notes

  • On iPad, the action sheet is presented as a popover centered on the screen.
  • Reset visible to false in your event handlers to keep state in sync with the native presentation.
Edit this page
Last Updated: 2/28/26, 11:24 PM
Contributors: Abdul Hamid, Claude Opus 4.6
Prev
VAlertDialog
Next
VModal