## Tabbar
### Install
``` javascript
import { Tabbar, TabbarItem } from 'vant';
Vue.component(Tabbar.name, Tabbar);
Vue.component(TabbarItem.name, TabbarItem);
```
### Usage
#### Basic Usage
:::demo Basic Usage
```html
Tab
Tab
Tab
Tab
```
```javascript
export default {
data() {
return {
active: 0
}
}
}
```
:::
#### Custom icon
Use `icon` slot to custom icon
:::demo Custom icon
```html
Custom
Tab
Tab
```
```javascript
export default {
data() {
return {
active2: 0,
icon: {
normal: '//img.yzcdn.cn/1.png',
active: '//img.yzcdn.cn/2.png'
}
}
}
}
```
:::
### Tabbar API
| Attribute | Description | Type | Default | Accepted Values |
|-----------|-----------|-----------|-------------|-------------|
| v-model | Index of current tab | `Number` | - | - |
### Tabbar Event
| Event | Description | Attribute |
|-----------|-----------|-----------|
| change | Triggered when change active tab | active: index of current tab |
### TabbarItem API
| Attribute | Description | Type | Default | Accepted Values |
|-----------|-----------|-----------|-------------|-------------|
| icon | Icon name | `String` | - | Names from Icon Component |
| dot | Whether to show red dot | `Boolean` | - | - |
| info | Info message | `String` | - | - |
| url | Link | `String` | - | - |
| to | Target route of the link, same as to of `vue-router` | `String | Object` | - | - |
| replace | If true, the navigation will not leave a history record | `String` | `false` | - |