[Vuejs]-How to smooth-scroll javascript scrollLeft in Vue3?

0๐Ÿ‘

I found that instead of scollLeft you can use scrollTo which brings some handy options:

const scrollRight = (() => {
    document.querySelector('.artwork-container').scrollTo({
        left: 500,
        behavior: 'smooth'
    })
})

Leave a comment