diff --git a/1224/jeanregisser-react-native-slider.md b/1224/jeanregisser-react-native-slider.md new file mode 100644 index 0000000000000000000000000000000000000000..d6068ae5f12eca2ca3a800306e7febb7fe0aefb2 --- /dev/null +++ b/1224/jeanregisser-react-native-slider.md @@ -0,0 +1,176 @@ +> 模板版本:v0.1.2 + +

+

jeanregisser-react-native-slider

+

+

+ + License + +

+ + +> [!tip] [Github 地址](https://github.com/react-native-oh-library/jeanregisser-react-native-slider/tree/sig) + +## 安装与使用 + +进入到工程目录并输入以下命令: + + + +#### **yarn** + +```bash +yarn add @react-native-oh-tpl/react-native-slider +``` + +#### **npm** +```bash +npm i --save @react-native-oh-tpl/react-native-slider +``` + + +下面的代码展示了这个库的基本使用场景: + +```js +import React, { useState} from 'react'; +import {Button, View, StyleSheet, Text } from 'react-native'; +import Slider from 'react-native-slider'; + + +export function SliderExample() { + const [isCheckerboardVisible, setIsCheckerboardVisible] = useState(false); + const [value, setValue] = useState(0.200); + return ( + + default style + + + with min,max and custom tints + + + with style,thumbStyle,thumbStyle + + + with thumbTouchSize,event + { + console.log('===Slider onValueChange: ' + value); + }} + + onSlidingStart={() => { + console.log('===Slider onSlidingStart'); + }} + + onSlidingComplete={() => { + console.log('===Slider onSlidingComplete'); + }} + /> + + with thumbImage + + + with animateTransitions + + +