# tabs > **NOTE** > > This component is supported since API version 4. Updates will be marked with a superscript to indicate their earliest API version. The **\** component provides a tab container. ## Required Permissions None ## Child Components Only [\](../arkui-js/js-components-container-tab-bar.md) and [\](../arkui-js/js-components-container-tab-content.md) are supported. ## Attributes In addition to the [universal attributes](../arkui-js/js-components-common-attributes.md), the following attributes are supported. | Name | Type | Default Value | Mandatory | Description | | -------- | ------- | ----- | ---- | ---------------------------------------- | | index | number | 0 | No | Index of the active tab. | | vertical | boolean | false | No | Whether the tab is vertical. Available values are as follows:
- **false**: The **\** and **\** are arranged vertically.
- **true**: The **\** and **\** are arranged horizontally. | ## Styles The [universal styles](../arkui-js/js-components-common-styles.md) are supported. ## Events In addition to the [universal events](../arkui-js/js-components-common-events.md), the following events are supported. | Name | Parameter | Description | | ------ | ------------------------------------ | ----------------------------- | | change | { index: indexValue } | Triggered upon tab switching. This event is not triggered when the **index** value is dynamically changed.| ## Example ```html
Home Index Detail
First screen
Second screen
Third screen
``` ```css /* xxx.css */ .container { flex-direction: column; justify-content: flex-start; align-items: center; } .tabs { width: 100%; } .tabcontent { width: 100%; height: 80%; justify-content: center; } .item-content { height: 100%; justify-content: center; } .item-title { font-size: 60px; } .tab-bar { margin: 10px; height: 60px; border-color: #007dff; border-width: 1px; } .tab-text { width: 300px; text-align: center; } ``` ```js // xxx.js export default { change: function(e) { console.log("Tab index: " + e.index); }, } ``` ![tab](figures/tab.gif)