Socket
Book a DemoInstallSign in
Socket

@5stones/react-native-slider

Package Overview
Dependencies
Maintainers
3
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@5stones/react-native-slider

A truly simple react-native slider

1.1.1
latest
Source
npmnpm
Version published
Weekly downloads
0
Maintainers
3
Weekly downloads
 
Created
Source

@5stones/react-native-slider

Commitizen friendly

A truly simple react-native slider.

Motivation

We needed a slider that was:

  • Based on react-native-gesture-handler.
  • Simple.

Every other slider is either based on react-native's gesture handler OR are several hundred lines of code and seemingly unnecessarily complex to debug. So we built a slider that was less than 200 lines of code and utilized react-native-gesture-handler.

Installation

npm install @5stones/react-native-slider

Usage

import React from 'react';
import { View } from 'react-native';
import Slider from "@5stones/react-native-slider";

const Screen: React.FC = () => {
  return (
    <View>
      <Slider/>
    </View>
  );
};

Props

NameOptionalTypeDescription
value:white_check_mark:numberA numeric value allowing between the minimumValue and maximumValue allowing you to control the position of the slider.
onValueChange:white_check_mark:(value: number) => voidA callback function allowing you to receive updates of the slider position.
thumbSize:white_check_mark:numberSpecify the size of the thumb (this is important as it's used to calculate positions).
minimumValue:white_check_mark:numberThe minimum bound of the sliders value.
maximumValue:white_check_mark:numberThe maximum bound of the sliders value.
defaultContainerWidth:white_check_mark:numberA default value for the width of the container (which will get overwritten dynamically after layout).
touchableContainerStyle:white_check_mark:ViewStyleA style object allowing you control over the touch target container.
containerStyle:white_check_mark:ViewStyleA style object allowing you control over the container.
thumbStyle:white_check_mark:ViewStyleA style object allowing you control over the thumb.
minimumTrackStyle:white_check_mark:ViewStyleA style object allowing you control over the minimum track.
maximumTrackStyle:white_check_mark:ViewStyleA style object allowing you control over the maximum track.

Release

The standard release command for this project is:

npm version [<newversion> | major | minor | patch | premajor | preminor | prepatch | prerelease | from-git]

This command will:

  • Generate/update the Changelog
  • Bump the package version
  • Tag & pushing the commit to GitHub & NPM

e.g.

npm version 1.2.17
npm version patch // 1.2.17 -> 1.2.18

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT

Keywords

reactnative

FAQs

Package last updated on 17 Sep 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.