Simal UI
Components

SegmentedControl

WEB APPROXIMATION — on iOS this renders the platform's native segmented control (@react-native-segmented-control/segmented-control); what you see here is the Material fallback built from Button/Text.

Check the iOS look on a simulator before signing off on it.

Import

import { SegmentedControl } from '@simal/ui/nativewindui';

Props

PropValuesDefaultDescription
values["Day","Week","Month"]The segment labels. Two to four reads well; beyond that the segments get too narrow to hit.
selectedIndexIndex of the active segment. Controlled — read onIndexChange and store it, or the selection snaps back.
onIndexChangeFires with the new index. On iOS this is the native control, so the change lands before your handler runs.
enabledbooleantrueFalse dims the whole control. There is no per-segment disable.

Examples

Interactive

Disabled

Two Segments

On this page