Vue skip to

It helps people who only use the keyboard to jump to what matters most.

Version: 1.0.6 Updated: 05/01/2020

By: vue-a11y License: MIT

Downloads Last 30 Days: 518


npm i vue-skip-to
yarn add vue-skip-to






It helps people who only use the keyboard to jump to what matters most

The population grows very fast nowadays and with that the number of visually impaired increases as well. Did you know that we have over 350 million visually impaired people in the world?

However, we are responsible for doing our utmost to make our applications usable and accessible to everyone.

"Skip to content" or "skip to a section" of your site is one of the most common accessibility techniques today, but not as used as it should be.

In addition to being a technique recommended by WCAG 2.0, that's where this component was inspired.



npm install -S vue-skip-to


yarn add vue-skip-to

How to use

In your main.js

import Vue from 'vue'
import VueSkipTo from 'vue-skip-to'


In your App.vue

  <div id="app">
    <vue-skip-to to="#main" text="Skip to main content" />

    <logo :src="require('@/assets/logo.png')" />
    <h1 data-va="main header">{{ msg }}</h1>
    <div id="main" role="main">
      <!-- My content -->
export default {
  name: 'app'
  components: {

Using with HTML files

<!--omitted -->
  <div id="app">
    <vue-skip-to to="#main"></vue-skip-to>

    <!-- my header, navigation, and more -->

    <div id="main" role="main">
      <!-- My content -->

  <script src=""></script>
  <script src=""></script>
    new Vue({
      el: "#app"


Check live demo


Prop Data Type required Description Default
to String false Set destination ID #main
text String false Text content of link Skip to main content
tabindex String false Specifies the tab order null

Custom style

You can style the link through the selector .vue-skip-to


Inspired by this article, to know more, access the link:

  • This component working in all modern browsers and IE9;
  • Ensures that the target element receives focus, even if it is not a tag that naturally receives focus as the tag input and a. In this case, the div are also given the focus and the tabindex attribute with the value of -1;
  • Add focus to the destination, even when the address bar already has the corresponding hash;

Run the tests

git clone vue-skip-to
npm install
npm run dev
npm run test

Or run Cypress on interactive mode

npm run test:open



  • Check the open issues or open a new issue to start a discussion around your feature idea or the bug you found;
  • Fork repository, make changes and send a pull request;

If you want a faster communication, find me on @ktquez And follow us on Twitter @vue_a11y

Thank you

Categories: Vue js