vue-slide-tabs

A vue.js slider tabs for mobile

Usage no npm install needed!

<script type="module">
  import vueSlideTabs from 'https://cdn.skypack.dev/vue-slide-tabs';
</script>

README

vue-slide-tabs

npm NpmLicense npm bundle size (minified) GitHub issues npm

Build Status codecov

A vue.js slider tabs for mobile

Demo

https://lpeihan.github.io/vue-slide-tabs/

Installation

npm install vue-slide-tabs --save

Usage

<template>
  <div class="app">
    <tabs :tabs="tabs" class="tab-container">
      <div>This is first tab</div>
      <div>This is second tab</div>
      <div>This is third tab</div>
    </tabs>
  </div>
</template>

<script>
import Tabs from "vue-slide-tabs";

export default {
  name: "app",
  components: {
    Tabs
  },
  data() {
    return {
      tabs: [
        {
          label: "关注"
        },
        {
          label: "推荐"
        },
        {
          label: "最新"
        }
      ]
    };
  }
};
</script>

Options

Props

Option Type Description Default
tabs Array tabs []

Events

Option Description params
change triggers when current tab change tabIndex