Skip to content

Commit 643257f

Browse files
ikoevskarigor789
authored andcommitted
Updated docs for TabView (#57)
* Updated docs for TabView * Updated description * Added some common properties * Added links to docs for native components * Fixed as per comment
1 parent 9c2fa7f commit 643257f

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed
Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
---
22
title: TabView
33
apiRef: https://docs.nativescript.org/api-reference/classes/_ui_tab_view_.tabview
4-
contributors: [MisterBrownRSA, rigor789, eddyverbruggen]
4+
contributors: [MisterBrownRSA, rigor789, eddyverbruggen, ikoevska]
55
---
66

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.
88

99
---
1010

1111
```html
1212
<TabView :selectedIndex="selectedIndex">
1313
<TabViewItem title="Tab 1">
14-
<label text="Content for Tab 1"></label>
14+
<Label text="Content for Tab 1" />
1515
</TabViewItem>
1616
<TabViewItem title="Tab 2">
17-
<label text="Content for Tab 2"></label>
17+
<Label text="Content for Tab 2" />
1818
</TabViewItem>
1919
</TabView>
2020
```
@@ -23,17 +23,21 @@ The TabView component allows you to display content grouped into tabs.
2323

2424
## Props
2525

26-
| name | type | description |
26+
| Name | Type | Description |
2727
|------|------|-------------|
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.
2932

3033
## Events
3134

32-
| name | description |
35+
| Name | Description |
3336
|------|-------------|
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
3540

36-
## Native Component
3741
| Android | iOS |
3842
|---------|-----|
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

Comments
 (0)