Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

83
Views
Any way to control VueRouter Smoothscroll-Speed?

I can achieve smooth-scroll router-links with:

  <router-link :to="{ hash: 'home' }">Home</router-link>
  <router-link :to="{ hash: 'about' }">About</router-link>

and router.js:

import Vue from "vue";
import VueRouter from "vue-router";

import Home from "../vue/home";
import About from "../vue/about";

Vue.use(VueRouter);

export default new VueRouter ({
    mode: "history",
    routes: [
        {path: "/", name: "home", component: Home},
        {path: "/about", name: "about", component: About},
    ],
    scrollBehavior(to, from,  savedPosition) {
        return {
            selector: to.hash,
            behavior: 'smooth'
        }
    }
});

The smooth-scroll effect is a bit slow compared to vue's v-smooth-scroll class. Is there any way to control the smooth-scroll speed of VueRouter?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

No.

Vue Router's Smooth Scrolling in implementing the native browser API ScrollToOptions.behavior. This is controlled by the client's browser. This can differ from system to system.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!