app').If you acquire an error with TS, attempt use( Vue3Spline, label: "Vue3Spline" ).To describe worldwide parts for Volar type-checking you will certainly require to add:.// components.d.ts.state element '@vue/ runtime-core' export interface GlobalComponents SplineAnimation: typeof import(' vue3-spline') [' Vue3Spline']export {-String.Split-|-}If needed rename component to make use of:.app.use( Vue3Spline, label: 'SplineAnimation')// use in template.name string (nonpayment: 'Vue3Spline') - established custom element name.As an alternative you may additionally import the element locally.bring in Vue3Spline from 'vue3-spline'.export default elements: Vue3Spline,.,.You can after that utilize the part in your layout.
Nuxt 3.This is still experimental. Will be upgraded soon.You can easily mount vue3-spline over anecdote or npm. spline-runtime is an addiction of vue3-spline and also must be automatically put up when you put up vue3-spline.If you are actually using npm:.npm mount vue3-spline@latest-- conserve.If you are making use of anecdote:.yarn incorporate vue3-spline@latest.Produce a folder phoned plugins at the root of your project.Generate a file named Vue3Spline.client.ts inside the plugins directory.Include the following code to the Vue3Spline.client.ts documents.import Vue3Spline from 'vue3-spline'.export nonpayment defineNuxtPlugin(( nuxtApp) => nuxtApp.vueApp.use( Vue3Spline). ).If you obtain an inaccuracy with TS, make an effort usage( Vue3Spline, name: "Vue3Spline" ).This should register as a worldwide element that you can easily name throughout your application under the tag.I would recommend using a parent tag to make certain that the animation simply bunches with it the customer side.
Github.