app').If you obtain an error along with TS, try make use of( Vue3Spline, name: "Vue3Spline" ).To determine global parts for Volar type-checking you are going to require to add:.// components.d.ts.announce component '@vue/ runtime-core' export user interface GlobalComponents SplineAnimation: typeof import(' vue3-spline') [' Vue3Spline']export {-String.Split-|-}If needed rename element to make use of:.app.use( Vue3Spline, label: 'SplineAnimation')// make use of in theme.label string (default: 'Vue3Spline') - established custom component label.Alternatively you can easily also import the element regionally.bring in Vue3Spline coming from 'vue3-spline'.export nonpayment components: Vue3Spline,.,.You can easily after that use the component in your layout.
Nuxt 3.This is actually still speculative. Will certainly be actually upgraded very soon.You may mount vue3-spline over anecdote or even npm. spline-runtime is actually a dependence of vue3-spline and must be immediately mounted when you install vue3-spline.If you are making use of npm:.npm put up vue3-spline@latest-- conserve.If you are actually utilizing anecdote:.yarn include vue3-spline@latest.Create a folder phoned plugins at the root of your job.Make a file named Vue3Spline.client.ts inside the plugins directory.Include the observing code to the Vue3Spline.client.ts report.bring in Vue3Spline coming from 'vue3-spline'.export default defineNuxtPlugin(( nuxtApp) => nuxtApp.vueApp.use( Vue3Spline). ).If you acquire an error with TS, attempt make use of( Vue3Spline, title: "Vue3Spline" ).This ought to sign up as an international element that you can name anywhere in your application under the tag.I would certainly recommend using a parent tag to guarantee that the computer animation merely lots with it the customer edge.
Github.