vite-plugin-vue-layouts-next weekly downloads statistics
By loicduong · npm · Vite plugins
Router based layout plugin for Vite 8, Vue 3 and Vue Router 5.
vite-plugin-vue-layouts-next has 14,699 recorded weekly downloads on npm, a decrease of 35.2% over the past 30 days, ranking #862 of 2,322 tracked listings.
About vite-plugin-vue-layouts-next
vite-plugin-vue-layouts-next
Router based layout plugin for Vite 8, Vue 3 and Vue Router 5.
A fork of vite-plugin-vue-layouts with some improvements and fixes, supports Vite 8, Vue 3 and Vue Router 5.
Layouts are stored in the /src/layouts folder by default and are standard Vue components with a <router-view></router-view> in the template.
Pages without a layout specified use default.vue for their layout.
You can use route blocks to allow each page to determine its layout. The block below in a page will look for /src/layouts/users.vue for its layout.
<route lang="yaml">
meta:
layout: users
</route>
Table of Contents
Install
# npm
npm install -D vite-plugin-vue-layouts-next
# yarn
yarn add -D vite-plugin-vue-layouts-next
# pnpm
pnpm add -D vite-plugin-vue-layouts-next
Usage
Add to your vite.config.ts:
import Vue from '@vitejs/plugin-vue'
import { defineConfig } from 'vite'
import Layouts from 'vite-plugin-vue-layouts-next'
import VueRouter from 'vue-router/vite'
export default defineConfig({
plugins: [VueRouter(), Vue(), Layouts()],
})
In main.ts, import Vue Router 5's generated file-based routes and setup the layouts.
import { setupLayouts } from 'virtual:generated-layouts'
import { createRouter } from 'vue-router'
import { routes } from 'vue-router/auto-routes'
const router = createRouter({
// ...
routes: setupLayouts(routes),
})
See Getting Started for client types and per-page layouts.
Documentation
Full documentation lives at vue-layouts.loicduong.dev:
- Getting Started - install, usage and client types
- Why - the rationale, and how this fork differs
- How it works - what
setupLayoutsdoes to your routes - Migration - upgrading to v3, including layout name normalization
- Config - plugin options, layout names and ClientSideLayout options
- Common Patterns - transitions and passing data between layouts and pages
- Dynamic Layouts -
setPageLayoutanduseLayout - Typed Layouts - generated
.d.tsthat type-checks layout names - ClientSideLayout - the lighter, glob-import based variant
- Examples - runnable SPA, SSG, client-side and nested-routes setups
The site also publishes llms.txt and llms-full.txt for LLM consumption.
The docs site is built with VitePress and lives in docs/. To work on it locally:
pnpm install
pnpm docs:dev
Maintainer
Thanks
Contributing
PRs accepted. Open an issue or submit PRs for any improvements.
License
Description from the npm listing.
- typescript
- vite-plugin
- vite
- vue-router
- vue
README badge
Show your rank in a README or on your website. The badge updates automatically.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Ranking history
Listing placement
Listing placement
Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.
Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.
Recent observations
Full history (122)Similar npm Vite plugins plugins
All 20 vite-plugin-vue-layouts-next alternativesData source
Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.
Listing: https://www.npmjs.com/package/vite-plugin-vue-layouts-next. First seen Oct 16, 2026; last successful collection Oct 20, 2026. See the methodology.