@react-native-segmented-control/segmented-control
一个 React Native 库,提供用于渲染来自 iOS 的 UISegmentedControl 的组件。
Android
iOS
Web
Included in Expo Go
For the complete documentation index, see llms.txt. Use this Use this file to discover all available pages.
它就像一个花哨的单选按钮,或者用苹果的话来说:“一种由多个分段组成的水平控件,每个分段都作为一个独立按钮发挥作用”(来源)。此组件在 iOS 上渲染为一个 UISegmentedControl,而在 Android 和 web 上则渲染为对该控件的忠实复刻(因为这些平台的标准库中没有对应的等价组件)。
安装
Terminal
- npx expo install @react-native-segmented-control/segmented-controlIf you are installing this in an existing React Native app, make sure to install expo in your project. Then, follow the installation instructions provided in the library's README or documentation.
了解更多
访问官方文档
获取有关 API 及其用法的完整信息。