app').If you obtain a mistake with TS, try usage( Vue3Spline, name: "Vue3Spline" ).To describe international parts for Volar type-checking you will certainly need to incorporate:.// components.d.ts.declare element '@vue/ runtime-core' export interface GlobalComponents SplineAnimation: typeof bring in(' vue3-spline') [' Vue3Spline']export {-String.Split-|-}If required rename component to utilize:.app.use( Vue3Spline, name: 'SplineAnimation')// use in design template.label cord (nonpayment: 'Vue3Spline') - established personalized component name.As an alternative you can easily also import the part locally.bring in Vue3Spline from 'vue3-spline'.export nonpayment parts: Vue3Spline,.,.You can easily after that utilize the part in your layout.
Nuxt 3.This is actually still experimental. Will be actually improved quickly.You can mount vue3-spline over anecdote or npm. spline-runtime is actually a dependence of vue3-spline and ought to be actually automatically installed when you set up vue3-spline.If you are actually utilizing npm:.npm put in vue3-spline@latest-- conserve.If you are actually utilizing yarn:.yarn include vue3-spline@latest.Produce a file called plugins at the root of your job.Produce a documents named Vue3Spline.client.ts inside the plugins directory.Include the complying with code to the Vue3Spline.client.ts file.import Vue3Spline from 'vue3-spline'.export nonpayment defineNuxtPlugin(( nuxtApp) => nuxtApp.vueApp.use( Vue3Spline). ).If you acquire an inaccuracy along with TS, make an effort make use of( Vue3Spline, title: "Vue3Spline" ).This should register as a global element that you can name anywhere in your app under the tag.I would certainly highly recommend using a moms and dad tag to make sure that the animation simply lots in on the client side.
Github.