npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@prefabs.tech/vue3-layout

v0.26.0

Published

Vue3 Layout Plugin

Readme

Prefabs Tech Vue3 Layout Plugin

Requirements

  • @prefabs.tech/vue3-config: >= 0.6.5
  • vue: >= 3.2
  • vue-router: >= 4.0

Installation

npm

npm install @prefabs.tech/vue3-layout @prefabs.tech/vue3-config`

yarn

yarn add @prefabs.tech/vue3-layout @prefabs.tech/vue3-config

PNPM

pnpm add @prefabs.tech/vue3-layout @prefabs.tech/vue3-config

Usage

main.ts

Import and register the plugin in main.ts.

import layoutPlugin from "@prefabs.tech/vue3-layout";
import "@prefabs.tech/vue3-layout/dist/PrefabsTechVue3Layout.css";

app.use(layoutPlugin);

...

app.mount("#app");

App.vue

  • Wrap your router view in the Layout component.
  • Optionnally, set a default layout. You can use one of our built-in layouts, or create your own. The default layout will be applied to all routes for which no layout is set.
<template>
  <Layout :default-layout="defaultLayout">
    <router-view />
  </Layout>
  <notifications />
</template>

<script setup lang="ts">
import { BasicLayout } from "@prefabs.tech/vue3-layout";
import { computed } from "vue";

const defaultLayout = computed(() => {
  return BasicLayout;
});
</script>

Set the layout for an individual route

The default layout set as the default-layout prop on the Layout component will apply by default to all routes, except those for which an explicit route is declared.

You can also customize the layout for individual routes by adding a meta.layout attribute to the route. The value of the attribute is the layout component you wish to use.

import { createRouter, createWebHistory } from "vue-router";

import CustomLayout from "@/layouts/CustomLayout.vue";
import Home from "@/views/Home.vue";
import ViewWithCustomLayout from "@/views/ViewWithCustomLayout.vue";

import type { RouteMeta, Router, RouterOptions } from "vue-router";

const router: Router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      component: HomeView,
      name: "home",
      path: "/",
    },
    {
      component: AboutView,
      meta: {
        layout: CustomLayout,
      },
      name: "custom",
      path: "/custom",
    },
  ],
} as RouterOptions);

export default router;

Configuration

| Name | Type | Description | Default value | |------|------|-------------|---------------| | homeRoute | string | The name of the "home" route, ie the route that points to your app's home page | home | | logo string | The path to the logo | /logo.png | | mainMenu | { name: string; route: string; }[] | An array of items to display in the app header's main menu | none |

CSS Variables

Basic layout

| Name | Description | Default value | |-------|------------|---------------| | layout-basic-gap | Size of basic layout flex-box gap | 1rem | | layout-basic-max-width | Maximum width of header, main and footer elements | 1200px | | layout-basic-padding-left | Left padding for header, main and footer elements | 0.8rem | | layout-basic-padding-right | Right padding for header, main and footer elements | 0.8rem |

AppHeader

| Name | Description | Default value | |-------|------------|---------------| | header-bg-color | Color of header background | transparent | | header-border-color | Color of header (bottom) border | #4169e1 | | header-font-size | Font size of header text | 1rem | | header-padding-bottom | Bottom padding for header | 0.8rem | | header-padding-top | Top padding for header | 0.8rem |

App footer

| Name | Description | Default value | |-------|------------|---------------| | footer-bg-color | Color of footer background | transparent | | footer-border-color | Color of footer (top) border | #4169e1 | | footer-font-size | Font size of footer text | 1rem | | footer-gap | Size of footer flex-box gap | 0.5rem | | footer-padding-bottom | Bottom padding for footer | 0.8rem | | footer-padding-top | Top padding for footer | 0.8rem |