app').If you obtain an inaccuracy with TS, try use( Vue3Spline, name: "Vue3Spline" ).To determine global components for Volar type-checking you will require to include:.// components.d.ts.declare module '@vue/ runtime-core' export interface GlobalComponents SplineAnimation: typeof import(' vue3-spline') [' Vue3Spline']export {-String.Split-|-}If required rename part to use:.app.use( Vue3Spline, title: 'SplineAnimation')// make use of in layout.name cord (default: 'Vue3Spline') - set personalized element name.As an alternative you can easily likewise import the part regionally.bring in Vue3Spline coming from 'vue3-spline'.export nonpayment elements: Vue3Spline,.,.You can then make use of the part in your layout.
Nuxt 3.This is still speculative. Will be actually improved very soon.You can easily put up vue3-spline over anecdote or npm. spline-runtime is a dependence of vue3-spline and also ought to be actually automatically installed when you put in vue3-spline.If you are using npm:.npm put up vue3-spline@latest-- save.If you are actually using yarn:.yarn include vue3-spline@latest.Produce a directory called plugins at the root of your task.Generate a report called Vue3Spline.client.ts inside the plugins directory.Include the following code to the Vue3Spline.client.ts file.bring in Vue3Spline coming from 'vue3-spline'.export default defineNuxtPlugin(( nuxtApp) => nuxtApp.vueApp.use( Vue3Spline). ).If you acquire an error with TS, attempt use( Vue3Spline, label: "Vue3Spline" ).This ought to enroll as a global element that you can easily name throughout your application under the tag.I will advise using a parent tag to ensure that the animation just lots in on the client edge.
Github.