npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

azir-slider

v1.0.1

Published

An advance Slider component that should render nicely on any platform. Supports a great level of customization.

Downloads

68

Readme

Azir Framwork : https://azir.io/docs

Slider

An advance slider component that should render nicely on any platform. Supports a great level of customization.

Installation

to install the latest version of azir-slider you only need to run:

npm install azir-slider  --save

or

yarn add azir-slider

Examples

Basic :

import Slider from "azir-slider";
---
<Slider
  value={30}
  step={10}
  minimumValue={0}
  maximumValue={100}
  onStart={value => console.log(value)}
  onChange={value => console.log(value)}
  onComplete={value => console.log(value)}
  trackColor="red"
  thumbColor="blue"
  progressTrackColor="green"
  thumbSize={50}
  trackSize={30}
/>

With Custom Icon :

import Slider from "azir-slider";
---
<Slider
  icon={<Icon size={20} color="red"></Icon>}
  humbColor="black"
  trackColor="black"
  progressTrackColor="red"
/>

Style1 :

import Slider from "azir-slider";
---
  <Slider trackStyle={styles.track} thumbStyle={styles.thumb} />
---
const styles = StyleSheet.create({
  track: {
    height: 14,
    borderRadius: 2,
    backgroundColor: "white",
    borderColor: "#9a9a9a",
    borderWidth: 1
  },
  thumb: {
    width: 20,
    height: 20,
    borderRadius: 2,
    backgroundColor: "#eaeaea",
    borderColor: "#9a9a9a",
    borderWidth: 1
  }
});

Style2 :

import Slider from "azir-slider";
---
  <Slider progressTrackColor="#30a935" trackStyle={styles.track} thumbStyle={styles.thumb} />
---
const styles = StyleSheet.create({
 track: {
    height: 4,
    borderRadius: 2
  },
  thumb: {
    width: 30,
    height: 30,
    borderRadius: 30 / 2,
    backgroundColor: "white",
    borderColor: "#30a935",
    borderWidth: 2
  }
});

Style3 :

import Slider from "azir-slider";
---
  <Slider progressTrackColor="#eb6e1b" trackStyle={styles.track} thumbStyle={styles.thumb} />
---
const styles = StyleSheet.create({
 track: {
    height: 10,
    borderRadius: 5,
    backgroundColor: "#d0d0d0"
  },
  thumb: {
    width: 10,
    height: 30,
    borderRadius: 5,
    backgroundColor: "#eb6e1b"
  }
});

Style4 :

import Slider from "azir-slider";
---
  <Slider progressTrackColor="#a4126e" trackStyle={styles.track} thumbStyle={styles.thumb} />
---
const styles = StyleSheet.create({
 track: {
    height: 10,
    borderRadius: 4,
    backgroundColor: "white",
    shadowColor: "black",
    shadowOffset: { width: 0, height: 1 },
    shadowRadius: 1,
    shadowOpacity: 0.15
  },
  thumb: {
    width: 20,
    height: 20,
    backgroundColor: "#f8a1d6",
    borderColor: "#a4126e",
    borderWidth: 5,
    borderRadius: 10,
    shadowColor: "black",
    shadowOffset: { width: 0, height: 2 },
    shadowRadius: 2,
    shadowOpacity: 0.35
  },
});

Style5 :

import Slider from "azir-slider";
---
  <Slider progressTrackColor="#303030" trackStyle={styles.track} thumbStyle={styles.thumb} />
---
const styles = StyleSheet.create({
  track: {
    height: 1,
    backgroundColor: "#303030"
  },
  thumb: {
    width: 30,
    height: 30,
    backgroundColor: "rgba(150, 150, 150, 0.3)",
    borderColor: "rgba(150, 150, 150, 0.6)",
    borderWidth: 14,
    borderRadius: 15
  }
});

Props


Reference

value

Initial value of the slider should be between minimum and maximum value

| Type | Required | Default | | ------ | -------- | ------- | | Number | No | 0 |

minimumValue

minimum value of the slider.

| Type | Required | Default | | ------ | -------- | ------- | | Number | No | 0 |

maximumValue

maximum value of the slider.

| Type | Required | Default | | ------ | -------- | ------- | | Number | No | 1 |

step

Step value of the slider. The value should be between 0 and maximumValue - minimumValue

| Type | Required | Default | | ------ | -------- | ------- | | Number | No | 0 |

trackSize

Step the height of the track.

| Type | Required | Default | | ------ | -------- | ------- | | Number | No | 3 |

thumbSize

Step the size of the thumb

| Type | Required | Default | | ------ | -------- | ------- | | Number | No | 25 |

thumbTouchSize

Step the Press area of the thumb

| Type | Required | Default | | -------------- | -------- | -------------------- | | {width,height} | No | {width:45,height:45} |

icon

Slider thumb Custom Icon ( JSX Element)

| Type | Required | Default | | -------------------------------------------------------- | -------- | ------- | | SolidIcons, RegularIcons, BrandIcons , CustomIcons , JSX | No | null |

disabled

If true, disable all interactions for this component.

| Type | Required | Default | | ---- | -------- | ------- | | bool | No | false |

thumbColor

Color of the Thumb

| Type | Required | Default | | ------------------------------------------ | -------- | ------- | | azir-color | No | theme |

trackColor

Color of the track

| Type | Required | Default | | ------------------------------------------ | -------- | ------- | | azir-color | No | #b3b3b3 |

progressTrackColor

Color of the progressed track .

| Type | Required | Default | | ------------------------------------------ | -------- | ------- | | azir-color | No | theme |

onStart

Callback called when the user starts changing the value (e.g. when the slider is pressed)

| Type | Required | Default | | -------- | -------- | ------- | | Function | No | null |

onChange

Callback continuously called while the user is dragging the slider

| Type | Required | Default | | -------- | -------- | ------- | | Function | No | null |

onComplete

Callback called when the user finishes changing the value (e.g. when the slider is released)

| Type | Required | Default | | -------- | -------- | ------- | | Function | No | null |

style

override Slider Container Style which include ( track and thumb )

| Type | Required | | ----- | -------- | | style | No |

trackStyle

override Slider Track Style .

| Type | Required | | ----- | -------- | | style | No |

thumbStyle

override Slider Thumb Style .

| Type | Required | | ----- | -------- | | style | No |