@thelacanians/vue-native-navigation

Stack navigation for Vue Native apps
7,161 29
Install
npm install @thelacanians/vue-native-navigation
Latest Version:0.23.3
Vue:3
License:MIT
Last Updated:Oct 19, 2026
Links: GitHub  ·  npm
Maintainer: sicksid

@thelacanians/vue-native-navigation

Stack navigation for Vue Native apps. Inspired by Vue Router with a native-first API.

Install

npm install @thelacanians/vue-native-navigation
# or
bun add @thelacanians/vue-native-navigation

Usage

Define routes

// app/main.ts
import { createApp } from 'vue'
import { createRouter } from '@thelacanians/vue-native-navigation'
import App from './App.vue'
import Home from './pages/Home.vue'
import Settings from './pages/Settings.vue'

const router = createRouter([
  { name: 'Home', component: Home },
  { name: 'Settings', component: Settings },
])

const app = createApp(App)
app.use(router)
app.start()

Add RouterView

<!-- App.vue -->
<template>
  <VSafeArea :style="{ flex: 1 }">
    <RouterView />
  </VSafeArea>
</template>

<script setup lang="ts">
import { RouterView } from '@thelacanians/vue-native-navigation'
</script>

Navigate

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

const router = useRouter()

function goToSettings() {
  router.push('Settings')
}

function goBack() {
  router.back()
}
</script>

Route params

// Pass params
router.push('UserProfile', { userId: '123' })

// Read params in the target screen
import { useRoute } from '@thelacanians/vue-native-navigation'

const route = useRoute()
const userId = route.value.params.userId

API

createRouter(routes)

Creates a router instance from an array of route configs.

interface RouteConfig {
  name: string
  component: Component
  options?: {
    title?: string
    headerShown?: boolean
    animation?: 'push' | 'modal' | 'fade' | 'none'
  }
}

useRouter()

Returns the router instance with navigation methods:

  • push(name, params?) - Navigate to a route
  • back() - Go back one screen
  • replace(name, params?) - Replace current screen
  • reset(name, params?) - Reset stack to a single screen

useRoute()

Returns a ComputedRef with the current route info:

interface RouteLocation {
  name: string
  params: Record<string, any>
  key: string
}

<RouterView />

Renders the current route's component with native transition animations.

License

MIT

Related Packages

@thelacanians/vue-native-runtime

Vue 3 custom renderer for native iOS and Android apps

7,647 29
@thelacanians/vue-native-cli

CLI for creating and running Vue Native apps

7,460 29
@thelacanians/vue-native-vite-plugin

Vite plugin for Vue Native — builds IIFE bundles for native runtimes

7,181 29

Version History

Version Released Vue License
0.23.3 >=3.5.40 <3.6.0 MIT
0.23.2 >=3.5.40 <3.6.0 MIT
0.23.1 >=3.5.40 <3.6.0 MIT
0.23.0 >=3.5.40 <3.6.0 MIT
0.22.0 >=3.5.40 <3.6.0 MIT