How to use the vue-scrollto.setDefaults function in vue-scrollto

To help you get started, we’ve selected a few vue-scrollto examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github DefinitelyTyped / DefinitelyTyped / types / vue-scrollto / vue-scrollto-tests.ts View on Github external
import Vue from "vue";
import * as VueScrollTo from "vue-scrollto";

Vue.use(VueScrollTo);
Vue.use(VueScrollTo, {offset: -100});

VueScrollTo.setDefaults({offset: -100});

class Test extends Vue {
    mounted() {
        this.$scrollTo(this.$el, {offset: -100});
        this.$scrollTo("#id");
        VueScrollTo.scrollTo("#id", {offset: -100});
    }
}

vue-scrollto

Adds a directive that listens for click events and scrolls to elements.

MIT
Latest version published 4 years ago

Package Health Score

56 / 100
Full package analysis

Popular vue-scrollto functions