Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VueHorizontal + Nuxt 3 #121

Open
thefubon opened this issue Nov 1, 2022 · 4 comments
Open

VueHorizontal + Nuxt 3 #121

thefubon opened this issue Nov 1, 2022 · 4 comments

Comments

@thefubon
Copy link

thefubon commented Nov 1, 2022

Please tell me how to install vue-horizontal globally for Nuxt 3 ? Your slider is the best I could find. Swiper and other framesavers are nervously smoking on the sidelines. Thank you for vue-horizontal!

@stevendprinsloo
Copy link

stevendprinsloo commented Apr 26, 2023

@fuxingloh if you could get a way for your component to work with Nuxt 3, that would be amazing!

@vietanhbui
Copy link

+1

@ayyobro
Copy link

ayyobro commented Jan 3, 2024

Yes please +1

@rankill
Copy link

rankill commented Oct 4, 2024

Not sure if it is late but made it work this way

Install Vue 3 vesrion

npm i vue-horizontal@next

Create client plugin

// vueHorizontal.client.js
import VueHorizontal from 'vue-horizontal'

export default defineNuxtPlugin(nuxtApp => {
  nuxtApp.vueApp.component('vue-horizontal', VueHorizontal)
})

Usage

Component will be 'autoimported' so you can use with the name defined in the plugin

  <vue-horizontal
        ref="horizontal"
        scroll
>
         .... 
</vue-horizontal>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants