app').If you obtain an inaccuracy along with TS, make an effort use( Vue3Spline, title: "Vue3Spline" ).To describe worldwide elements for Volar type-checking you will definitely need to add:.// components.d.ts.proclaim element '@vue/ runtime-core' export interface GlobalComponents SplineAnimation: typeof import(' vue3-spline') [' Vue3Spline']export {-String.Split-|-}If required rename element to use:.app.use( Vue3Spline, title: 'SplineAnimation')// use in layout.title string (default: 'Vue3Spline') - established personalized element name.Conversely you can additionally import the part in your area.bring in Vue3Spline coming from 'vue3-spline'.export nonpayment components: Vue3Spline,.,.You can easily after that utilize the component in your layout.
Nuxt 3.This is actually still experimental. Will be actually updated very soon.You may put in vue3-spline over yarn or npm. spline-runtime is a dependence of vue3-spline as well as ought to be actually immediately installed when you set up vue3-spline.If you are actually using npm:.npm set up vue3-spline@latest-- spare.If you are actually making use of anecdote:.yarn add vue3-spline@latest.Generate a directory phoned plugins at the origin of your project.Produce a file named Vue3Spline.client.ts inside the plugins directory site.Include the adhering to code to the Vue3Spline.client.ts documents.bring in Vue3Spline coming from 'vue3-spline'.export nonpayment defineNuxtPlugin(( nuxtApp) => nuxtApp.vueApp.use( Vue3Spline). ).If you get an error with TS, try usage( Vue3Spline, name: "Vue3Spline" ).This ought to register as an international element that you may refer to as anywhere in your app under the tag.I will encourage making use of a parent tag to make certain that the computer animation only tons with it the client edge.
Github.