Socket
Socket
Sign inDemoInstall

range-slider-element

Package Overview
Dependencies
0
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    range-slider-element

A customizable range slider element


Version published
Weekly downloads
623
increased by15.16%
Maintainers
1
Install size
30.4 kB
Created
Weekly downloads
 

Changelog

Source

1.0.0 (2020-12-21)

Features

  • introduce .defaultValue (#31) (e29b00c)

Readme

Source

<range-slider> element

A customizable range slider element.

CI status npm version

Accessible range slider custom element with keyboard support.
Follows the ARIA best practices guide on sliders.

  • No dependencies
  • Customizable styling
  • Touchscreen friendly
  • Keyboard accessible


range slider element preview example

Install

$ npm install range-slider-element

Usage

import 'range-slider-element';
<range-slider min="0" max="100" step="1"></range-slider>

Attributes

  • min The minimum permitted value. The default is 0.
  • max The maximum permitted value. The default is 100.
  • step The stepping interval. The default is 1.
  • value The value. The default is min + (max - min) / 2.
  • dir Directionality. The default is ltr.

Styling

Exposed CSS custom properties scoped within the range-slider element.

  • --value-percent - The current value in percentage, e.g. 50%
range-slider {}
range-slider .thumb-wrapper {}
range-slider .thumb {}

Events

  • input - Pointer move, value updated. Bubbles.
  • change - Pointer up, value updated. Bubbles.

Browser support

Browsers without native custom element support require a polyfill.

License

MIT © André Ruffert

Keywords

FAQs

Last updated on 21 Dec 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc