Gathering detailed insights and metrics for @blur-ui/slider
Gathering detailed insights and metrics for @blur-ui/slider
Gathering detailed insights and metrics for @blur-ui/slider
Gathering detailed insights and metrics for @blur-ui/slider
Collection of React components for building modern web applications.
npm install @blur-ui/slider
Typescript
Module System
Node Version
NPM Version
61.2
Supply Chain
86.2
Quality
82.5
Maintenance
100
Vulnerability
100
License
TypeScript (93.19%)
JavaScript (2.32%)
Handlebars (2.24%)
CSS (1.82%)
MDX (0.34%)
Makefile (0.1%)
Total Downloads
1,024
Last Day
1
Last Week
2
Last Month
13
Last Year
1,024
MIT License
1 Stars
57 Commits
1 Watchers
1 Branches
1 Contributors
Updated on May 01, 2025
Minified
Minified + Gzipped
Latest Version
1.0.11
Package Id
@blur-ui/slider@1.0.11
Unpacked Size
21.46 kB
Size
5.83 kB
File Count
6
NPM Version
10.8.2
Node Version
20.17.0
Published on
Jan 21, 2025
Cumulative downloads
Total Downloads
Last Day
0%
1
Compared to previous day
Last Week
0%
2
Compared to previous week
Last Month
-58.1%
13
Compared to previous month
Last Year
0%
1,024
Compared to previous year
1
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.
react
>= 18.0.0motion
>= 11.15.0To install the Slider
component, use npm or yarn:
1npm install @blur-ui/slider
or
1yarn add @blur-ui/slider
Here's a basic example of how to use the Slider
component:
1import React from 'react'; 2import { Slider } from '@blur-ui/slider'; 3 4const App = () => { 5 const handleValueChange = (value: number) => { 6 console.log('Slider value:', value); 7 }; 8 9 return ( 10 <Slider 11 value={0.5} 12 onValueChange={handleValueChange} 13 classNames={{ base: 'custom-slider', track: 'custom-track' }} 14 /> 15 ); 16}; 17 18export default App;
The Slider
component accepts the following props:
number
(optional) - The current value of the slider. Should be between 0 and 1. Default is 0
.(value: number) => void
(optional) - Callback function called when the value of the slider changes.(value: number) => void
(optional) - Callback function called when the value change is complete.'horizontal' | 'vertical'
(optional) - The orientation of the slider. Default is 'horizontal'
.number
(optional) - The step size for changing the slider value when using arrow keys. Default is 0.1
.SpringOptions
(optional) - Transition options for the slider track animation.AnimationOptions
(optional) - Transition options for the stretch reset animation.SliderClassnames
(optional) - Custom class names for styling the slider and track.SliderStyles
(optional) - Custom styles for styling the slider and track.ReactNode
(optional) - Any child elements to be rendered inside the slider.boolean
(optional) - If set to true, disables the stretch animation. Default is false
.number
(optional) - The coefficient that controls the amount of stretch applied. Default is 300
.'ltr' | 'rtl'
(optional) - The direction of the slider. Default is 'ltr'
.boolean
(optional) - If set to true, disables the slider. Default is false
.boolean
(optional) - If set to true, the slider will start animating from the start of the track. Default is false
.1<Slider 2 value={0.2} 3 orientation='vertical' 4 classNames={{ 5 base: 'w-16 h-46 bg-neutral-200 rounded-2xl', 6 track: 'bg-neutral-400', 7 }} 8/>
1<Slider 2 value={0.5} 3 isDisabled 4 classNames={{ 5 base: 'w-70 h-3 bg-neutral-200 rounded-xl data-[disabled]:opacity-50', 6 track: 'bg-neutral-400', 7 }} 8/>
This project is licensed under the MIT License.
No vulnerabilities found.
No security vulnerabilities found.