You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
selectedIndex | index of tab item to be selected initially| [0] | number
71
-
selectedIndices |Array of indices of tab items to be selected initially - when multiple prop is true else it will take selectedIndex| [0] | arrayOf(PropTypes.number)
72
-
enable | Boolean to enable or disable the component | true | bool
73
-
multiple | Boolean which enables the multiple selection option | false | bool
74
-
borderRadius | borderRadius of whole tab | 5 | number
75
-
tabsContainerStyle | external styles can be passed to override the default styles of the segmentedControl wrapper| base styles added in SegmentedControlTab.js | object(styles)
76
-
tabsContainerDisableStyle | Custom style that can be passed when `enable` is set to false | default style `opacity: 0.6` | object(styles)
77
-
tabStyle | external styles can be passed to override the default styles of the tabs| base styles added in SegmentedControlTab.js | object(styles)
78
-
tabTextStyle | external styles can be passed to override the default styles of the tab title| base styles added in SegmentedControlTab.js | object(styles)
79
-
activeTabStyle | external styles can be passed to override the default styles of the active tab| base styles added in SegmentedControlTab.js | object(styles)
80
-
activeTabTextStyle | external styles can be passed to override the default styles of the active tab text| base styles added in SegmentedControlTab.js | object(styles)
tabBadgeContainerStyle | external style can be passed to override the default style of the badge container | base styles added in SegmentedControlTab.js | object(styles)
83
-
activeTabBadgeContainerStyle | external style can be passed to override the default style of the active badge container | base styles added in SegmentedControlTab.js | object(styles)
84
-
tabBadgeStyle | external style can be passed to override the default style of the badge text | base styles added in SegmentedControlTab.js | object(styles)
85
-
activeTabBadgeStyle | external style can be passed to override the default style of the active badge text | base styles added in SegmentedControlTab.js | object(styles)
86
-
onTabPress | call-back function when a tab is selected | () => {} | func
87
-
allowFontScaling | whether the segment & badge text should allow font scaling (default matches React Native default) | true | bool
88
-
accessible | enables accessibility for each tab | true | bool
89
-
accessibilityLabels | Reads out the given text on each tab press when voice over is enabled. If not set, uses the text passed in as values in props as a fallback | ['Label 1', 'Label 2', 'Label 3'] | array
90
-
activeTabOpacity | Opacity value to customize tab press | 1 | number
| selectedIndex | index of tab item to be selected initially |[0]| number |
73
+
| selectedIndices | Array of indices of tab items to be selected initially - when multiple prop is true else it will take selectedIndex |[0]| arrayOf(PropTypes.number) |
74
+
| enabled | Boolean to enable or disable the component | true | bool |
75
+
| multiple | Boolean which enables the multiple selection option | false | bool |
76
+
| borderRadius | borderRadius of whole tab | 5 | number |
77
+
| tabsContainerStyle | external styles can be passed to override the default styles of the segmentedControl wrapper | base styles added in SegmentedControlTab.js | object(styles) |
78
+
| tabsContainerDisableStyle | Custom style that can be passed when `enable` is set to false | default style `opacity: 0.6`| object(styles) |
79
+
| tabStyle | external styles can be passed to override the default styles of the tabs | base styles added in SegmentedControlTab.js | object(styles) |
80
+
| tabTextStyle | external styles can be passed to override the default styles of the tab title | base styles added in SegmentedControlTab.js | object(styles) |
81
+
| activeTabStyle | external styles can be passed to override the default styles of the active tab | base styles added in SegmentedControlTab.js | object(styles) |
82
+
| activeTabTextStyle | external styles can be passed to override the default styles of the active tab text | base styles added in SegmentedControlTab.js | object(styles) |
| tabBadgeContainerStyle | external style can be passed to override the default style of the badge container | base styles added in SegmentedControlTab.js | object(styles) |
85
+
| activeTabBadgeContainerStyle | external style can be passed to override the default style of the active badge container | base styles added in SegmentedControlTab.js | object(styles) |
86
+
| tabBadgeStyle | external style can be passed to override the default style of the badge text | base styles added in SegmentedControlTab.js | object(styles) |
87
+
| activeTabBadgeStyle | external style can be passed to override the default style of the active badge text | base styles added in SegmentedControlTab.js | object(styles) |
88
+
| onTabPress | call-back function when a tab is selected | () => {} | func |
89
+
| allowFontScaling | whether the segment & badge text should allow font scaling (default matches React Native default) | true | bool |
90
+
| accessible | enables accessibility for each tab | true | bool |
91
+
| accessibilityLabels | Reads out the given text on each tab press when voice over is enabled. If not set, uses the text passed in as values in props as a fallback |['Label 1', 'Label 2', 'Label 3']| array |
92
+
| activeTabOpacity | Opacity value to customize tab press | 1 | number |
onPress={index=>this.setState({ selected: index })}
107
+
/>;
108
+
109
+
conststyles=StyleSheet.create({
110
+
tabsContainerStyle: {
111
+
//custom styles
112
+
},
113
+
tabStyle: {
114
+
//custom styles
115
+
},
116
+
tabTextStyle: {
117
+
//custom styles
118
+
},
119
+
activeTabStyle: {
120
+
//custom styles
121
+
},
122
+
activeTabTextStyle: {
123
+
//custom styles
124
+
},
125
+
tabBadgeContainerStyle: {
126
+
//custom styles
127
+
},
128
+
activeTabBadgeContainerStyle: {
129
+
//custom styles
130
+
},
131
+
tabBadgeStyle: {
132
+
//custom styles
133
+
},
134
+
activeTabBadgeStyle: {
135
+
//custom styles
136
+
}
137
+
});
138
+
```
138
139
139
140
## P.S.
141
+
140
142
🙏 credits to all the other devs who had built the similar concept, had referred some of the their components on the github, to get a fair idea 💡 to build this.😊
141
143
If you have any idea in implementing this further, let me know or you can update it and raise a PR.😊🚀
0 commit comments