Skip to content

Vue Stack TabsTab-level isolation, stack-based navigation

A tab manager for Vue 3 and Vue Router. Every tab keeps its own page instance, cache and navigation stack — pages in different tabs never interfere.

首页keep-alive

每个标签 = 独立页面实例 + 缓存 + 导航栈

Install in 30 seconds ​

bash
pnpm add vue-stack-tabs
bash
npm install vue-stack-tabs
bash
yarn add vue-stack-tabs
ts
// main.ts
import { createApp } from 'vue'
import VueStackTabs from 'vue-stack-tabs'
import 'vue-stack-tabs/dist/style.css'

const app = createApp(App)
app.use(router)
app.use(VueStackTabs)
app.mount('#app')

Then put <VueStackTabs iframe-path="/iframe" /> in the parent route that should host the tabs, and let the router do the rest. See Getting Started.

Compared with one iframe per tab ​

one iframe per tabvue-stack-tabs
Isolationbrowser-level, the strongestVue scope level — enough, and yours to control
Runtime costone app runtime per iframeone shared runtime, pages cached per tab
CommunicationpostMessage serializationreuse components, stores and types directly
Routingseparate URL and historysynced with Vue Router, stack-based forward / backward
Stylingisolated by the browseryou decide the boundary

When you actually need document-level isolation — embedding a third-party site, for example — the iframe tab is still there.

Where to go next ​

Released under the Apache License.