app').If you acquire a mistake with TS, try use( Vue3Spline, name: "Vue3Spline" ).To determine global parts for Volar type-checking you will require to include:.// components.d.ts.announce module '@vue/ runtime-core' export user interface GlobalComponents SplineAnimation: typeof import(' vue3-spline') [' Vue3Spline']export {-String.Split-|-}If required rename part to utilize:.app.use( Vue3Spline, name: 'SplineAnimation')// use in design template.label string (default: 'Vue3Spline') - established custom component name.Additionally you can additionally import the component regionally.bring in Vue3Spline from 'vue3-spline'.export default components: Vue3Spline,.,.You may after that utilize the part in your theme.
Nuxt 3.This is actually still experimental. Will be actually upgraded soon.You can easily mount vue3-spline over anecdote or even npm. spline-runtime is an addiction of vue3-spline and also need to be actually instantly set up when you mount vue3-spline.If you are utilizing npm:.npm set up vue3-spline@latest-- save.If you are actually using anecdote:.anecdote add vue3-spline@latest.Make a folder called plugins at the origin of your task.Develop a data named Vue3Spline.client.ts inside the plugins directory site.Include the following code to the Vue3Spline.client.ts data.import Vue3Spline coming from 'vue3-spline'.export default defineNuxtPlugin(( nuxtApp) => nuxtApp.vueApp.use( Vue3Spline). ).If you receive a mistake with TS, try use( Vue3Spline, name: "Vue3Spline" ).This should register as a worldwide component that you may call anywhere in your app under the tag.I will highly recommend making use of a moms and dad tag to make sure that the animation only lots in on the client side.
Github.