Skip to content

Commit 399f7b3

Browse files
authored
Merge pull request #445 from NativeScript/niliev/tabs-styling
docs: add Tabs/BottomNavigaiton styling options
2 parents 4ab0a18 + 34156ce commit 399f7b3

File tree

3 files changed

+16
-21
lines changed

3 files changed

+16
-21
lines changed

app/ng-ui-widgets-category/bottom-navigation/styling/styling.component.css

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
/* >> bottom-nav-theming-css-ng */
2-
TabStripItem.tabstripitem {
3-
background-color: teal;
2+
TabStrip {
3+
selected-item-color: blueviolet;
4+
un-selected-item-color: brown;
5+
highlight-color: gold;
46
}
57

6-
TabStripItem.tabstripitem:active {
7-
background-color: yellowgreen;
8-
}
9-
108
TabContentItem.first-tabcontent {
119
background-color: seashell;
1210
color: olive;

app/ng-ui-widgets-category/tabs/styling/article.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
> **Note:** - The integration with `nativescript-theme` and the support for custom CSS is currently under development and is on its way.
22
3+
The main styling options are introduced with three specific properties that should be set on the `TabStrip` component.
4+
5+
- `selectedItemnColor`: Sets the text color of the selected tab strip item. Also sets the color of the tab strip icon when the icon is an icon font (`font://`).
6+
- `unSelectedItemColor`: Sets the text color of the unselected tab strip items. Also sets the color of the tab strip icon when the icon is an icon font (`font://`).
7+
- `highlightColor`: Sets the color of the underline for the selected tab strip item.
8+
9+
Those properties can be set dynamically, inline and via CSS.
10+
311
<snippet id='tabs-theming-css-ng'/>
412

513
> **Note:** Currently, we can set only the `backgroundColor`, `color`, `fontFamily`, `fontSize`, `fontStyle`, `fontWeight` and `textTransform` styling properties to the `Label` and `Image` components inside the TabStripItem. More about the usage of those properties can be found in the [Styling]({%slug styling%}#supported-css-properties) article.
Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,10 @@
11
/* >> tabs-theming-css-ng */
2-
Tabs.bottom-nav {
3-
background-color: orangered;
4-
color: gold;
5-
font-size: 18;
2+
TabStrip {
3+
selected-item-color: blueviolet;
4+
un-selected-item-color: brown;
5+
highlight-color: gold;
66
}
77

8-
TabStripItem.tabstripitem-active {
9-
background-color: teal;
10-
}
11-
12-
TabStripItem.tabstripitem-active:active {
13-
background-color: yellowgreen;
14-
}
15-
168
TabContentItem.first-tabcontent {
179
background-color: seashell;
1810
color: olive;
@@ -25,7 +17,4 @@ TabContentItem.third-tabcontent {
2517
background-color: blueviolet;
2618
color: antiquewhite;
2719
}
28-
Tabs TabStrip{
29-
highlight-color: red;
30-
}
3120
/* << tabs-theming-css-ng */

0 commit comments

Comments
 (0)