app').If you get a mistake along with TS, try usage( Vue3Spline, label: "Vue3Spline" ).To define worldwide elements for Volar type-checking you will certainly require to incorporate:.// components.d.ts.declare module '@vue/ runtime-core' export interface GlobalComponents SplineAnimation: typeof import(' vue3-spline') [' Vue3Spline']export {-String.Split-|-}If needed to have rename component to make use of:.app.use( Vue3Spline, label: 'SplineAnimation')// use in theme.label strand (nonpayment: 'Vue3Spline') - specified custom-made part title.Conversely you can easily likewise import the part locally.import Vue3Spline coming from 'vue3-spline'.export default parts: Vue3Spline,.,.You may after that utilize the component in your template.
Nuxt 3.This is actually still experimental. Will certainly be actually upgraded soon.You may put in vue3-spline over anecdote or even npm. spline-runtime is an addiction of vue3-spline and also need to be immediately installed when you put in vue3-spline.If you are actually utilizing npm:.npm put in vue3-spline@latest-- spare.If you are actually making use of anecdote:.yarn add vue3-spline@latest.Produce a folder gotten in touch with plugins at the root of your task.Create a file called Vue3Spline.client.ts inside the plugins directory.Incorporate the adhering to code to the Vue3Spline.client.ts report.import Vue3Spline from 'vue3-spline'.export default defineNuxtPlugin(( nuxtApp) => nuxtApp.vueApp.use( Vue3Spline). ).If you get a mistake with TS, attempt use( Vue3Spline, title: "Vue3Spline" ).This must sign up as a worldwide part that you can call throughout your app under the tag.I would certainly highly recommend using a moms and dad tag to guarantee that the animation merely loads in on the customer edge.
Github.