app').If you obtain an error with TS, make an effort make use of( Vue3Spline, name: "Vue3Spline" ).To determine international elements for Volar type-checking you will need to incorporate:.// components.d.ts.announce element '@vue/ runtime-core' export interface GlobalComponents SplineAnimation: typeof import(' vue3-spline') [' Vue3Spline']export {-String.Split-|-}If needed rename element to use:.app.use( Vue3Spline, title: 'SplineAnimation')// usage in template.name cord (default: 'Vue3Spline') - set customized part title.Conversely you can likewise import the element locally.bring in Vue3Spline from 'vue3-spline'.export nonpayment components: Vue3Spline,.,.You can easily then utilize the component in your template.
Nuxt 3.This is actually still experimental. Will certainly be upgraded soon.You can set up vue3-spline over anecdote or npm. spline-runtime is actually a dependence of vue3-spline as well as should be immediately put up when you put in vue3-spline.If you are actually making use of npm:.npm mount vue3-spline@latest-- save.If you are making use of anecdote:.yarn incorporate vue3-spline@latest.Produce a directory phoned plugins at the origin of your job.Make a data named Vue3Spline.client.ts inside the plugins directory site.Include the complying with code to the Vue3Spline.client.ts file.import Vue3Spline coming from 'vue3-spline'.export nonpayment defineNuxtPlugin(( nuxtApp) => nuxtApp.vueApp.use( Vue3Spline). ).If you receive a mistake with TS, make an effort usage( Vue3Spline, label: "Vue3Spline" ).This ought to sign up as a global element that you can refer to as anywhere in your application under the tag.I would recommend making use of a moms and dad tag to make sure that the animation merely bunches in on the customer edge.
Github.