File tree Expand file tree Collapse file tree 4 files changed +21
-0
lines changed Expand file tree Collapse file tree 4 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -234,6 +234,15 @@ An object container
234234
235235Extends [ ViewStyles] ( https://reactnative.dev/docs/view-style-props )
236236
237+ ### ` sliderStyle `
238+
239+ (Android and Web only) Styles the slider component (Animated.View)
240+ | Type | Required | Platform |
241+ | ------ | -------- | -------- |
242+ | object | No | Android, Web |
243+
244+ Extends [ ViewStyles] ( https://reactnative.dev/docs/view-style-props )
245+
237246## Tips and Tricks
238247
239248### How can I increase the height of the tab ?
Original file line number Diff line number Diff line change @@ -110,6 +110,11 @@ export interface SegmentedControlProps extends ViewProps {
110110 * Touchable style properties for Segmented Control Tab
111111 */
112112 tabStyle ?: ViewStyle ;
113+
114+ /**
115+ * Style properties for the Animated.View component
116+ */
117+ sliderStyle ?: ViewStyle ;
113118}
114119
115120/**
Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ const SegmentedControl = ({
3636 fontStyle,
3737 activeFontStyle,
3838 appearance,
39+ sliderStyle,
3940} : SegmentedControlProps ) : React . Node => {
4041 const colorSchemeHook = useColorScheme ( ) ;
4142 const colorScheme = appearance || colorSchemeHook ;
@@ -117,6 +118,7 @@ const SegmentedControl = ({
117118 < Animated . View
118119 style = { [
119120 styles . slider ,
121+ sliderStyle ,
120122 {
121123 transform : [ { translateX : animation } ] ,
122124 width : segmentWidth - 4 ,
Original file line number Diff line number Diff line change @@ -107,4 +107,9 @@ export type SegmentedControlProps = $ReadOnly<{|
107107 * Touchable style properties for Segmented Control Tab
108108 */
109109 tabStyle ?: ViewStyle ,
110+
111+ /**
112+ * Style properties for the slider component (Animated.View)
113+ */
114+ sliderStyle ?: ViewStyle ,
110115| } > ;
You can’t perform that action at this time.
0 commit comments