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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@blur-ui/slider

v1.0.11

Published

The Slider component for React with ios-styled animations

Downloads

25

Readme

Slider

The Slider component is a completely unstyled customizable UI element for React that allows users to select a value between 0 and 1. It supports both horizontal and vertical orientations and provides smooth animations for track movement and stretch effects.

This component relies on the motion library as a dependency.

Live examples

Features

  • Supports both horizontal and vertical orientations.
  • Provides smooth animations for track movement and stretch effects.
  • Fully unstyled and customizable.
  • RTL support.
  • Keyboard support.

Requirements

  • react >= 18.0.0
  • motion >= 11.15.0

Installation

To install the Slider component, use npm or yarn:

npm install @blur-ui/slider

or

yarn add @blur-ui/slider

Usage

Here's a basic example of how to use the Slider component:

import React from 'react';
import { Slider } from '@blur-ui/slider';

const App = () => {
  const handleValueChange = (value: number) => {
    console.log('Slider value:', value);
  };

  return (
    <Slider
      value={0.5}
      onValueChange={handleValueChange}
      classNames={{ base: 'custom-slider', track: 'custom-track' }}
    />
  );
};

export default App;

Props

The Slider component accepts the following props:

  • value: number (optional) - The current value of the slider. Should be between 0 and 1. Default is 0.
  • onValueChange: (value: number) => void (optional) - Callback function called when the value of the slider changes.
  • onValueChangeStop: (value: number) => void (optional) - Callback function called when the value change is complete.
  • orientation: 'horizontal' | 'vertical' (optional) - The orientation of the slider. Default is 'horizontal'.
  • arrowStep: number (optional) - The step size for changing the slider value when using arrow keys. Default is 0.1.
  • trackTransition: SpringOptions (optional) - Transition options for the slider track animation.
  • resetStretchTransition: AnimationOptions (optional) - Transition options for the stretch reset animation.
  • classNames: SliderClassnames (optional) - Custom class names for styling the slider and track.
  • styles: SliderStyles (optional) - Custom styles for styling the slider and track.
  • children: ReactNode (optional) - Any child elements to be rendered inside the slider.
  • disableStretch: boolean (optional) - If set to true, disables the stretch animation. Default is false.
  • stretchCoefficient: number (optional) - The coefficient that controls the amount of stretch applied. Default is 300.
  • dir: 'ltr' | 'rtl' (optional) - The direction of the slider. Default is 'ltr'.
  • isDisabled: boolean (optional) - If set to true, disables the slider. Default is false.
  • fromStart: boolean (optional) - If set to true, the slider will start animating from the start of the track. Default is false.

Examples

Vertical Slider

<Slider
  value={0.2}
  orientation='vertical'
  classNames={{
    base: 'w-16 h-46 bg-neutral-200 rounded-2xl',
    track: 'bg-neutral-400',
  }}
/>

Disabled Slider

<Slider
  value={0.5}
  isDisabled
  classNames={{
    base: 'w-70 h-3 bg-neutral-200 rounded-xl data-[disabled]:opacity-50',
    track: 'bg-neutral-400',
  }}
/>

License

This project is licensed under the MIT License.