Vue 3 plugin to use Inertiajs links within Vuetify components.
npm install vuetify-inertia-linkbash
npm install vuetify-inertia-link
`
`javascript
import VuetifyInertiaLink from 'vuetify-inertia-link';
app.use(VuetifyInertiaLink);
`
Example app.js
`javascript
import { createApp, h } from 'vue';
import { createInertiaApp } from '@inertiajs/vue3';
import { resolvePageComponent } from 'laravel-vite-plugin/inertia-helpers';
import { ZiggyVue } from '../../vendor/tightenco/ziggy/dist/vue.m';
import { createVuetify } from 'vuetify'
import VuetifyInertiaLink from "vuetify-inertia-link";
const vuetify = createVuetify({
components,
directives,
})
createInertiaApp({
title: (title) => ${title},
resolve: (name) => resolvePageComponent(./Pages/${name}.vue, import.meta.glob('./Pages/*/.vue')),
setup({ el, App, props, plugin }) {
return createApp({ render: () => h(App, props) })
.use(plugin)
.use(ZiggyVue)
.use(vuetify)
.use(VuetifyInertiaLink)
.mount(el);
},
});
`
Usage
`html
Home
`
or as a menu:
`html
Dashboard
User
About
``