Gathering detailed insights and metrics for @urban-ui/slider
Gathering detailed insights and metrics for @urban-ui/slider
npm install @urban-ui/slider
Typescript
Module System
Node Version
NPM Version
65.9
Supply Chain
84.7
Quality
75.1
Maintenance
100
Vulnerability
100
License
TypeScript (81.52%)
JavaScript (9.62%)
Handlebars (8.57%)
CSS (0.3%)
Total Downloads
368
Last Day
1
Last Week
5
Last Month
13
Last Year
64
407 Commits
2 Watching
3 Branches
1 Contributors
Minified
Minified + Gzipped
Latest Version
0.1.0
Package Id
@urban-ui/slider@0.1.0
Unpacked Size
57.53 kB
Size
6.94 kB
File Count
8
NPM Version
8.19.2
Node Version
19.0.0
Publised On
20 Mar 2023
Cumulative downloads
Total Downloads
Last day
0%
1
Compared to previous day
Last week
66.7%
5
Compared to previous week
Last month
225%
13
Compared to previous month
Last year
-78.9%
64
Compared to previous year
2
1
control | slider
Styled version of radix-ui/slider
## Getting started
1pnpm add -S @urban-ui/slider
1import * as Slider from '@urban-ui/slider' 2 3export function MyComponent() { 4 return ( 5 <Slider.Root defaultValue={[50]} max={100} step={1} aria-label='Volume'> 6 <Slider.Track> 7 <Slider.Range /> 8 </Slider.Track> 9 <Slider.Thumb /> 10 </Slider.Root> 11 ) 12}
Styled wrapper around radix-ui/slider. Components are named the same and will accept the same props.
Prop | Type | Description |
---|---|---|
size | 'sm' | 'md' | 'lg' | Applies the control field token scale. Determines the interactive zone. |
width | 'normal' | 'full' | Defaults to normal |
### Slider.Track
Size xs
is the default and is smaller than the thumb. The other sizes match the control field token scale and will match the thumb size.
Prop | Type | Description |
---|---|---|
tone | 'primary' | 'critical' | 'neutral' | 'highlight' | Defaults to neutral |
size | 'xs' | 'sm' | 'md' | 'lg' | Height of the track. Defaults to xs. |
### Slider.Range
The range denotes the ranged part of the track, this is usually left-to-right and so the range will typically be on the left.
Defaults to no tone at all.
Prop | Type | Description |
---|---|---|
tone | 'primary' | 'critical' | 'neutral' | 'highlight' | Defaults to neutral |
### Slider.Thumb
The space
prop adds a small external border to the thumb, this will be the current colour and defaults to white. This provides visual separation from the track. If your background is a different colour then use the css
prop to define a new colour. Be wary of gradient backgrounds.
Disabled state also applies the same coloured external border.
Prop | Type | Description |
---|---|---|
tone | 'primary' | 'critical' | 'neutral' | 'highlight' | Defaults to neutral |
size | 'xs' | 'sm' | 'md' | 'lg' | Height of the track. Defaults to xs. |
type | 'clear' | Clears styling, useful for icons. |
space | boolean | Defaults to false |
No vulnerabilities found.
No security vulnerabilities found.