Reference version

This is documentation for the next SDK version. For up-to-date documentation, see the latest version (SDK 56).

@react-native-community/slider

一个 React Native 组件库,提供访问系统 UI 的滑块控件。

Android
iOS
Web
Included in Expo Go

For the complete documentation index, see llms.txt. Use this file to discover all available pages.

重要 @expo/ui 提供了一个即插即用的替代方案,可替代 @react-native-community/slider,在 Android 上由 Jetpack Compose 提供支持,在 iOS 上由 SwiftUI 提供支持。

一个组件库,提供对滑块控件系统 UI 的访问,使用户可以通过拖动锚点在一系列值中进行选择。

安装

Terminal
npx expo install @react-native-community/slider

If 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 及其用法的完整信息。