1
1
---
2
2
title : TabView
3
3
apiRef : https://docs.nativescript.org/api-reference/classes/_ui_tab_view_.tabview
4
- contributors : [MisterBrownRSA, rigor789, eddyverbruggen]
4
+ contributors : [MisterBrownRSA, rigor789, eddyverbruggen, ikoevska ]
5
5
---
6
6
7
- The TabView component allows you to display content grouped into tabs.
7
+ ` < TabView> ` is a navigation component that shows content grouped into tabs and lets users switch between tabs.
8
8
9
9
---
10
10
11
11
``` html
12
12
<TabView :selectedIndex =" selectedIndex" >
13
13
<TabViewItem title =" Tab 1" >
14
- <label text =" Content for Tab 1" ></ label >
14
+ <Label text =" Content for Tab 1" / >
15
15
</TabViewItem >
16
16
<TabViewItem title =" Tab 2" >
17
- <label text =" Content for Tab 2" ></ label >
17
+ <Label text =" Content for Tab 2" / >
18
18
</TabViewItem >
19
19
</TabView >
20
20
```
@@ -23,17 +23,21 @@ The TabView component allows you to display content grouped into tabs.
23
23
24
24
## Props
25
25
26
- | name | type | description |
26
+ | Name | Type | Description |
27
27
| ------| ------| -------------|
28
- | ` selectedIndex ` | ` Number ` | The currently selected tab. Default is ` 0 `
28
+ | ` selectedIndex ` | ` Number ` | Gets or sets the currently selected tab. Default is ` 0 ` .
29
+ | ` tabTextColor ` | ` Color ` | (Style property) Gets or sets the text color of the tabs titles.
30
+ | ` tabBackgroundColor ` | ` Color ` | (Style property) Gets or sets the background color of the tabs.
31
+ | ` selectedTabTextColor ` | ` Color ` | (Style property) Gets or sets the text color of the selected tab title.
29
32
30
33
## Events
31
34
32
- | name | description |
35
+ | Name | Description |
33
36
| ------| -------------|
34
- | ` selectedIndexChanged ` | Emitted when one of the tab-view-item components are tapped
37
+ | ` selectedIndexChanged ` | Emitted when one of the ` <TabViewItem> ` components is tapped.
38
+
39
+ ## Native component
35
40
36
- ## Native Component
37
41
| Android | iOS |
38
42
| ---------| -----|
39
- | android.support.v4.view.ViewPager | UITabBarController
43
+ | [ ` android.support.v4.view.ViewPager ` ] ( https://developer.android.com/reference/android/support/v4/view/ViewPager.html ) | [ ` UITabBarController ` ] ( https://developer.apple.com/documentation/uikit/uitabbarcontroller )
0 commit comments