Vue NativeVue Native
Guide
Components
Composables
Navigation
Architecture
  • iOS
  • Android
  • macOS
GitHub
Guide
Components
Composables
Navigation
Architecture
  • 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
    • VSVG
    • VWebView
    • VVideo
  • Lists

    • VList
    • VFlatList
    • VSectionList
  • Feedback

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

    • VTransition & VTransitionGroup
    • KeepAlive
    • VSuspense
  • Navigation

    • VNavigationBar
    • VTabBar
    • VDrawer
  • System

    • VStatusBar
    • VPicker
  • macOS

    • VToolbar
    • VSplitView
    • VOutlineView

VDrawer

Drawer navigation component (side menu). Slides in from the left or right edge of the screen with an optional overlay backdrop.

Import

import { VDrawer } from '@thelacanians/vue-native-runtime'

Usage

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

const isOpen = ref(false)
</script>

<template>
  <VPressable @press="isOpen = true" :style="{ padding: 16 }">
    <VText>Open Menu</VText>
  </VPressable>

  <VDrawer v-model:open="isOpen" position="left">
    <template #header>
      <VText :style="{ fontSize: 20, fontWeight: 'bold' }">Menu</VText>
    </template>

    <VDrawer.Item icon="home" label="Home" @press="navigate('home')" />
    <VDrawer.Item icon="settings" label="Settings" @press="navigate('settings')" />
    <VDrawer.Item icon="profile" label="Profile" @press="navigate('profile')" />

    <template #footer>
      <VText :style="{ fontSize: 12, color: '#888' }">v1.0.0</VText>
    </template>
  </VDrawer>
</template>

Props

PropTypeDefaultDescription
openbooleanfalseControls drawer visibility (use with v-model:open)
position'left' | 'right''left'Which side the drawer slides in from
widthnumber280Width of the drawer panel in points
overlayColorstring'rgba(0,0,0,0.5)'Color of the backdrop overlay
closeOnPressbooleantrueWhether pressing a drawer item closes the drawer
closeOnPressOutsidebooleantrueWhether pressing the overlay closes the drawer

Events

EventPayloadDescription
update:openbooleanEmitted when drawer visibility changes
open—Emitted when the drawer becomes visible
close—Emitted when the drawer becomes hidden

Slots

SlotDescription
defaultMain drawer content (items, lists, etc.)
headerContent above the main items (logo, title, etc.)
footerContent below the main items (version, logout, etc.)

VDrawer.Item

Individual menu items within the drawer.

Props

PropTypeDefaultDescription
iconstring—Emoji or icon identifier
labelstring—Display text
activebooleanfalseWhether this item is currently selected
badgestring | number—Optional badge text/number
disabledbooleanfalsePrevents the item from being pressed

Events

EventPayloadDescription
press—Emitted when the item is tapped

VDrawer.Section

Groups drawer content under an optional heading.

PropTypeDefaultDescription
titlestring''Section heading

The default slot contains the section items.

Edit this page
Last Updated: 7/28/26, 4:10 PM
Contributors: github-actions[bot]
Prev
VTabBar