Start sharing components as a team!Share components as a team!Join Bit to build your applications faster.Get Started Free

wired-slider

v1.0.0arrow_drop_down
v1.0.0
v0.9.2
STATUS
Passing
DOWNLOADS
6
LICENSE
MIT
VISIBILITY
Public
PUBLISHED
6 months ago
SIZE
16 KB
Hand-drawn sketchy slider web component which allows user to select a value from a range by moving the slider thumb.
1 contributor
Use wired-slider in your project ?
Copied
npm i @bit/wiredjs.wired-elements.wired-slider
Set Bit as a scoped registryLearn more
npm config set '@bit:registry' https://node.bit.dev
Component Example
React
React
Vue
Angular
Add dependency... help_outline
Just
import
any of the 1 million components
and packages in Bit or NPM to the example.
import Button from '@bit/grommet.grommet.button';
import Lodash from 'lodash';
revert changes
reload
toggle layout
maximize
modifieddraft
chevron_left
chevron_right

wired slider

wired-slider

Hand-drawn sketchy slider web component which allows user to select a value from a range by moving the slider thumb.

Range can be set using the min, max value. Default range is 0-100.

For demo and view the complete set of wired-elememts: wiredjs.com

Usage

Add wired-slider to your project:

npm i wired-slider

Import wired-slider definition into your HTML page:

<script type="module" src="wired-slider/lib/wired-slider.js"></script>

Or into your module script:

import { WiredSlider } from "wired-slider"

Use it in your web page:

<wired-slider></wired-slider>
<wired-slider disabled></wired-slider>
<wired-slider knobradius="15" value="10" min="5" max="15"></wired-slider>

Properties

value - Numeric value of the slider.

min - Minimum value of the slider. Default is 0.

max - Maximum value of the slider. Default ia 100.

knobradius - Radius of the knob of the slider.

Custom CSS Variables

–wired-slider-knob-zero-color Color of the knob when the value is at minimum.

–wired-slider-knob-color Color of the knob when the value is NOT at minimum.

–wired-slider-bar-color Color of the bar on which the knob slides.

Events

change event fired when the user changes the slider value.

License

MIT License © Preet Shihn