app').If you obtain an error with TS, try usage( Vue3Spline, name: "Vue3Spline" ).To describe global parts for Volar type-checking you will certainly need to include:.// components.d.ts.proclaim module '@vue/ runtime-core' export interface GlobalComponents SplineAnimation: typeof import(' vue3-spline') [' Vue3Spline']export {-String.Split-|-}If needed to have rename element to use:.app.use( Vue3Spline, label: 'SplineAnimation')// usage in template.title strand (default: 'Vue3Spline') - set custom-made component label.Alternatively you can also import the part locally.bring in Vue3Spline from 'vue3-spline'.export nonpayment elements: Vue3Spline,.,.You can at that point use the component in your layout.
Nuxt 3.This is actually still experimental. Will certainly be actually upgraded soon.You may set up vue3-spline over anecdote or npm. spline-runtime is actually a dependency of vue3-spline as well as must be actually automatically installed when you set up vue3-spline.If you are using npm:.npm put in vue3-spline@latest-- conserve.If you are utilizing anecdote:.yarn incorporate vue3-spline@latest.Make a file called plugins at the origin of your task.Produce a data named Vue3Spline.client.ts inside the plugins directory site.Incorporate the adhering to code to the Vue3Spline.client.ts report.import Vue3Spline from 'vue3-spline'.export nonpayment defineNuxtPlugin(( nuxtApp) => nuxtApp.vueApp.use( Vue3Spline). ).If you receive an error along with TS, attempt make use of( Vue3Spline, label: "Vue3Spline" ).This must enroll as a global component that you may call anywhere in your application under the tag.I will encourage making use of a parent tag to make certain that the animation simply loads in on the customer edge.
Github.