SegmentedControl picks one value out of a few, shown as a row of buttons in a frame. Each button takes a label and optional icons. It fills the width by default. See the web SegmentedControl for the same component in the browser.
Without value, the control keeps its own state. It starts on defaultValue, or on the first button. onChange is required.
Pass value with onChange when the screen owns the selection.
compact draws outlined buttons without the frame around them. fillWidth={false} sizes the control to its buttons.
- There is no keyboard navigation. Buttons take taps from at least 44pt around them.
- Buttons take value, label, prefixIcon, suffixIcon and disabled only.