app').If you get a mistake with TS, try use( Vue3Spline, label: "Vue3Spline" ).To define worldwide parts for Volar type-checking you are going to need to incorporate:.// components.d.ts.announce element '@vue/ runtime-core' export user interface GlobalComponents SplineAnimation: typeof bring in(' vue3-spline') [' Vue3Spline']export {-String.Split-|-}If needed rename part to make use of:.app.use( Vue3Spline, label: 'SplineAnimation')// make use of in layout.title string (default: 'Vue3Spline') - established personalized part label.Additionally you can additionally import the component locally.bring in Vue3Spline coming from 'vue3-spline'.export default parts: Vue3Spline,.,.You may at that point make use of the part in your layout.
Nuxt 3.This is actually still experimental. Will certainly be updated very soon.You can mount vue3-spline over yarn or npm. spline-runtime is actually a dependency of vue3-spline and also must be immediately put up when you put up vue3-spline.If you are actually using npm:.npm put up vue3-spline@latest-- conserve.If you are actually utilizing anecdote:.anecdote incorporate vue3-spline@latest.Make a folder contacted plugins at the origin of your task.Generate a report named Vue3Spline.client.ts inside the plugins listing.Add the complying with code to the Vue3Spline.client.ts report.import Vue3Spline coming from 'vue3-spline'.export nonpayment defineNuxtPlugin(( nuxtApp) => nuxtApp.vueApp.use( Vue3Spline). ).If you acquire an inaccuracy with TS, make an effort use( Vue3Spline, name: "Vue3Spline" ).This must sign up as an international element that you can refer to as anywhere in your app under the tag.I would certainly highly recommend utilizing a moms and dad tag to ensure that the animation merely loads with it the client side.
Github.