0.1.4 • Published 8 years ago

vue-fixed-tabs v0.1.4

Weekly downloads
189
License
MIT
Repository
github
Last release
8 years ago

vue-fixed-tabs

A tabs component and fixed tabs directive for Vue

Installation

NPM

$ npm install vue-fixed-tabs

Local Setup

  • Install with npm install
  • Build with npm run build

Usage

CommonJS

var VueFixedTabs = require('vue-fixed-tabs');

Vue.use(VueFixedTabs)

ES6

import alert from 'vue-fixed-tabs'

Vue.use(VueFixedTabs)

Browser globals

<div id="app">
  
  <v-tabs tabs-fixed="true" tabs-offset="0" tabs-init="0" tabs-classes="classA,classB" tab-click="activeTab">
    <v-tab tab-title="Tab1" tab-id="tab1">
      Tab 1 content
    </v-tab>
    <v-tab tab-title="Tab2" tab-id="tab2">
      Tab 2 content
    </v-tab>
    <v-tab tab-title="Tab3" tab-id="tab3">
      Tab 3 content
    </v-tab>
  </div>

</div>

<script src="path/vue.js"></script>
<script src="path/vue-fixed-tabs.js"></script>
<script>
    var vm = new Vue({
        el: "#app",
        events: {
          activeTab: function(tabid) {
            console.log(tabid + ' is now active')
          }
        }
    })
</script>

Props

v-tabs

PropDescription
tabs-fixedoptional default: true - fixed tabs when scrolling
tabs-initoptional default: 0 - init active tab index
tabs-offsetoptional default: 0 - distance from the top of the screen to the fixed tabs
tabs-clickoptional - event name of the parent instance, triggered then a tab clicked
tabs-title-classesoptional - your classes on tabs title
tabs-content-classesoptional - your classes on tabs content

v-tab

PropDescription
tabs-title
tab-id

License

The MIT License.

0.1.4

8 years ago

0.1.3

8 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago