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

VNavigationBar

A navigation bar component for screen titles and back navigation. Renders a fixed-height bar at the top of the screen with a title, optional back button, and customizable colors.

Usage

<VNavigationBar
  title="Settings"
  :showBack="true"
  @back="router.pop()"
/>

Props

PropTypeDefaultDescription
titlestring''The title displayed in the center of the bar
showBackbooleanfalseShow a back button on the left side
backTitlestring'Back'Label for the back button
backgroundColorstring'#FFFFFF'Background color of the navigation bar
tintColorstring'#007AFF'Color of the back button text and icon
titleColorstring'#000000'Color of the title text

Events

EventPayloadDescription
@back--Fired when the back button is pressed

Example

<script setup>
import { useRouter } from '@thelacanians/vue-native-navigation'

const router = useRouter()
</script>

<template>
  <VView :style="{ flex: 1 }">
    <VNavigationBar
      title="Profile"
      :showBack="router.canGoBack.value"
      backTitle="Back"
      backgroundColor="#F8F8F8"
      tintColor="#007AFF"
      titleColor="#333333"
      @back="router.pop()"
    />
    <VView :style="{ flex: 1, padding: 16 }">
      <VText>Screen content goes here</VText>
    </VView>
  </VView>
</template>

Notes

  • VNavigationBar is exported from @thelacanians/vue-native-navigation, not the runtime package.
  • The bar renders as a VView with a fixed height. It does not automatically account for the safe area — wrap it in a VSafeArea or add top padding on devices with notches.
  • The back button only appears when showBack is true. Connect it to router.pop() or your own navigation logic.
Edit this page
Last Updated: 2/28/26, 11:24 PM
Contributors: Abdul Hamid, Claude Opus 4.6
Next
VTabBar