HomeGuidesReferenceLearn

Reference version

ArchiveExpo SnackDiscord and ForumsNewsletter

SegmentedControl

GitHub

npm

A React Native library that provides a component to render UISegmentedControl from iOS.


It's like a fancy radio button, or in Apple's words: "A horizontal control that consists of multiple segments, each segment functioning as a discrete button" (source). This component renders to a UISegmentedControl on iOS, and to faithful recreations of that control on Android and web (because no equivalent exists on those platforms' standard libraries).

Platform Compatibility

Android DeviceAndroid EmulatoriOS DeviceiOS SimulatorWeb

Installation

Terminal
npx expo install @react-native-segmented-control/segmented-control

If you are installing this in an existing React Native app (bare workflow), start by installing expo in your project. Then, follow the additional instructions as mentioned by library's README under "Installation in bare React Native projects" section.

Usage

See full documentation at react-native-community/segmented-control.