tabs
A slim tab component for Vue.js (1.3 kB minified).
Install
Usage
You can use it as a plugin if you don't mind registering components globally:
Use a slot as tab title
Props
<Tabs>
defaultIndex
Type: Number
Default: 0
Index of selected tab on the first render.
onSelect
Type: function
Default: undefined
The function to invoke as user selects a tab by clicking:
<Tab>
title
Type: string
vNode
Required: required unless titleSlot
is set
Use a string or vNode as tab title.
titleSlot
Type: string
Use a slot as the tab title.
disabled
Type: Boolean
Default: undefined
Disable relevant tab, i.e. make it unselectable.
Development
Run the example with Poi:
Contributing
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D