SegmentedControl
SegmentedControl component for toggling two values or more
(code example)
#
Usage<SegmentedControl segments={[{label: '1st'}, {label: '2nd'}]}/>
#
API#
activeBackgroundColorThe background color of the active segment
string
#
activeColorThe color of the active segment label
string
#
backgroundColorThe background color of the inactive segments
string
#
borderRadiusThe segmentedControl borderRadius
number
#
containerStyleAdditional spacing styles for the container
ViewStyle
#
iconOnRightShould the icon be on right of the label
boolean
#
initialIndexInitial index to be active
number
#
onChangeIndexCallback for when index has change.
(index: number) => void
#
outlineColorThe color of the active segment outline
string
#
outlineWidthThe width of the active segment outline
number
#
segmentLabelStyleSegment label style
TextStyle
#
segmentsArray on segments
SegmentedControlItemProps
#
segmentsStyleAdditional style for the segments
ViewStyle
#
styleCustom style to inner container
ViewStyle
#
testIDComponent test id
string
#
throttleTimeTrailing throttle time of changing index in ms.
number