app').If you get an error along with TS, try usage( Vue3Spline, label: "Vue3Spline" ).To define global elements for Volar type-checking you are going to need to add:.// components.d.ts.state element '@vue/ runtime-core' export interface GlobalComponents SplineAnimation: typeof import(' vue3-spline') [' Vue3Spline']export {-String.Split-|-}If required rename element to use:.app.use( Vue3Spline, title: 'SplineAnimation')// usage in layout.title cord (nonpayment: 'Vue3Spline') - set custom part label.Conversely you can easily also import the element locally.import Vue3Spline coming from 'vue3-spline'.export nonpayment elements: Vue3Spline,.,.You can at that point make use of the part in your template.
Nuxt 3.This is actually still experimental. Will certainly be improved quickly.You can easily mount vue3-spline over yarn or even npm. spline-runtime is actually a dependency of vue3-spline as well as need to be actually instantly installed when you set up vue3-spline.If you are actually using npm:.npm put up vue3-spline@latest-- conserve.If you are actually using yarn:.yarn include vue3-spline@latest.Make a folder called plugins at the root of your venture.Make a data named Vue3Spline.client.ts inside the plugins listing.Include the following code to the Vue3Spline.client.ts data.bring in Vue3Spline coming from 'vue3-spline'.export default defineNuxtPlugin(( nuxtApp) => nuxtApp.vueApp.use( Vue3Spline). ).If you get a mistake with TS, try usage( Vue3Spline, label: "Vue3Spline" ).This ought to enroll as a global part that you can easily call throughout your application under the tag.I would advise utilizing a moms and dad tag to make sure that the animation simply bunches with it the client edge.
Github.