https://github.com/rescript-react-native/slider
ReScript bindings for @react-native-community/slider
https://github.com/rescript-react-native/slider
react react-native rescript rescript-react rescript-react-native slider
Last synced: 2 months ago
JSON representation
ReScript bindings for @react-native-community/slider
- Host: GitHub
- URL: https://github.com/rescript-react-native/slider
- Owner: rescript-react-native
- License: mit
- Created: 2019-09-03T06:55:19.000Z (almost 6 years ago)
- Default Branch: main
- Last Pushed: 2023-05-06T16:39:06.000Z (about 2 years ago)
- Last Synced: 2025-04-13T12:08:32.732Z (2 months ago)
- Topics: react, react-native, rescript, rescript-react, rescript-react-native, slider
- Language: ReScript
- Homepage:
- Size: 177 KB
- Stars: 7
- Watchers: 3
- Forks: 3
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# `@rescript-react-native/slider`
[](https://github.com/rescript-react-native/slider/actions)
[](https://www.npmjs.com/@rescript-react-native/slider)
[](https://forum.rescript-lang.org/)[ReScript](https://rescript-lang.org) bindings for
[`@react-native-community/slider`](https://github.com/callstack/react-native-slider).Exposed as `ReactNativeSlider` module.
`@rescript-react-native/slider` X.y.\* means it's compatible with
`@react-native-community/slider` X.y.\*## Installation
When
[`@react-native-community/slider`](https://github.com/callstack/react-native-slider)
is properly installed & configured by following their installation instructions,
you can install the bindings:```console
npm install @rescript-react-native/slider
# or
yarn add @rescript-react-native/slider
````@rescript-react-native/slider` should be added to `bs-dependencies` in your
`bsconfig.json`:```diff
{
//...
"bs-dependencies": [
"@rescript/react",
"rescript-react-native",
// ...
+ "@rescript-react-native/slider"
],
//...
}
```## Usage
```rescript
ReactNativeSlider.make(
~style: ReactNative.Style.t=?,
~value: float=?,
~step: float=?,
~minimumValue: float=?,
~maximumValue: float=?,
~minimumTrackTintColor: string=?,
~maximumTrackTintColor: string=?,
~disabled: bool=?,
~onSlidingStart: float => unit=?,
~onSlidingComplete: float => unit=?,
~onValueChange: float => unit=?,
~testID: string=?,
~children: React.element=?,
// iOS Props
~maximumTrackImage: ReactNative.Image.Source.t=?,
~minimumTrackImage: ReactNative.Image.Source.t=?,
~thumbImage: ReactNative.Image.Source.t=?,
~trackImage: ReactNative.Image.Source.t=?,
~inverted: bool=?,
// Android
~thumbTintColor: string=?// ... And all props
)
```### Example
```rescript
dp,
~height=40.->dp,
()
)
)
}
minimumValue={0.}
maximumValue={1.}
minimumTrackTintColor="#FFFFFF"
maximumTrackTintColor="#000000"
/>
```---
## Changelog
Check the [changelog](./CHANGELOG.md) for more informations about recent
releases.---
## Contribute
Read the
[contribution guidelines](https://github.com/rescript-react-native/.github/blob/master/CONTRIBUTING.md)
before contributing.## Code of Conduct
We want this community to be friendly and respectful to each other. Please read
[our full code of conduct](https://github.com/rescript-react-native/.github/blob/master/CODE_OF_CONDUCT.md)
so that you can understand what actions will and will not be tolerated.