app').If you obtain an error with TS, make an effort use( Vue3Spline, title: "Vue3Spline" ).To specify global components for Volar type-checking you will certainly require to add:.// components.d.ts.proclaim module '@vue/ runtime-core' export interface GlobalComponents SplineAnimation: typeof import(' vue3-spline') [' Vue3Spline']export {-String.Split-|-}If needed rename part to use:.app.use( Vue3Spline, label: 'SplineAnimation')// make use of in design template.title cord (default: 'Vue3Spline') - specified custom-made element name.Additionally you can easily likewise import the element locally.import Vue3Spline coming from 'vue3-spline'.export default parts: Vue3Spline,.,.You can easily after that utilize the component in your template.
Nuxt 3.This is actually still speculative. Will certainly be upgraded very soon.You may mount vue3-spline over yarn or even npm. spline-runtime is actually a dependency of vue3-spline and must be instantly mounted when you put in vue3-spline.If you are actually making use of npm:.npm mount vue3-spline@latest-- save.If you are utilizing anecdote:.anecdote include vue3-spline@latest.Make a folder gotten in touch with plugins at the root of your job.Develop a documents called Vue3Spline.client.ts inside the plugins listing.Incorporate the observing code to the Vue3Spline.client.ts data.import Vue3Spline from 'vue3-spline'.export nonpayment defineNuxtPlugin(( nuxtApp) => nuxtApp.vueApp.use( Vue3Spline). ).If you obtain a mistake along with TS, try usage( Vue3Spline, label: "Vue3Spline" ).This must sign up as a worldwide part that you may call anywhere in your app under the tag.I will suggest making use of a parent tag to make certain that the animation just loads in on the client side.
Github.