{"id":13906897,"url":"https://github.com/Stryzhevskyi/rangeSlider","last_synced_at":"2025-07-18T04:33:17.296Z","repository":{"id":27551897,"uuid":"31033616","full_name":"Stryzhevskyi/rangeSlider","owner":"Stryzhevskyi","description":"Simple, small and fast vanilla JavaScript polyfill for the HTML5 `\u003cinput type=\"range\"\u003e` slider element.","archived":false,"fork":false,"pushed_at":"2020-02-17T20:02:50.000Z","size":541,"stargazers_count":177,"open_issues_count":7,"forks_count":42,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-11-11T10:32:36.436Z","etag":null,"topics":["es6","input-range","pure-javascript","range-slider","rangeslider","vanilla-javascript"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Stryzhevskyi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-02-19T19:51:55.000Z","updated_at":"2024-10-22T20:18:18.000Z","dependencies_parsed_at":"2022-08-30T20:00:52.259Z","dependency_job_id":null,"html_url":"https://github.com/Stryzhevskyi/rangeSlider","commit_stats":null,"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stryzhevskyi%2FrangeSlider","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stryzhevskyi%2FrangeSlider/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stryzhevskyi%2FrangeSlider/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stryzhevskyi%2FrangeSlider/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Stryzhevskyi","download_url":"https://codeload.github.com/Stryzhevskyi/rangeSlider/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226353508,"owners_count":17611716,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["es6","input-range","pure-javascript","range-slider","rangeslider","vanilla-javascript"],"created_at":"2024-08-06T23:01:44.350Z","updated_at":"2024-11-25T15:30:55.508Z","avatar_url":"https://github.com/Stryzhevskyi.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# rangeSlider\n\n\u003e Simple, small and fast vanilla JavaScript polyfill for the HTML5 `\u003cinput type=\"range\"\u003e` slider element.\n\u003e Forked from [André Ruffert's jQuery plugin](https://github.com/andreruffert/rangeslider.js)\n\nCheck out the [examples](http://stryzhevskyi.github.io/rangeSlider/).\n\n* Touchscreen friendly\n* Recalculates `onresize`\n* Small and fast\n* Supports all major browsers\n* Buffer progressbar (for downloading progress etc.)\n\n## Install\nInstall with [npm](https://www.npmjs.com/package/rangeslider-pure):\n``npm install --save rangeslider-pure``\n\n## Usage\n\n```js\n// Initialize a new plugin instance for one element or NodeList of elements.\nconst slider = document.querySelector('input[type=\"range\"]');\nrangeSlider.create(slider, {\n    polyfill: true,     // Boolean, if true, custom markup will be created\n    root: document,\n    rangeClass: 'rangeSlider',\n    disabledClass: 'rangeSlider--disabled',\n    fillClass: 'rangeSlider__fill',\n    bufferClass: 'rangeSlider__buffer',\n    handleClass: 'rangeSlider__handle',\n    startEvent: ['mousedown', 'touchstart', 'pointerdown'],\n    moveEvent: ['mousemove', 'touchmove', 'pointermove'],\n    endEvent: ['mouseup', 'touchend', 'pointerup'],\n    vertical: false,    // Boolean, if true slider will be displayed in vertical orientation\n    min: null,          // Number, 0\n    max: null,          // Number, 100\n    step: null,         // Number, 1\n    value: null,        // Number, center of slider\n    buffer: null,       // Number, in percent, 0 by default\n    stick: null,        // [Number stickTo, Number stickRadius] : use it if handle should stick to ${stickTo}-th value in ${stickRadius}\n    borderRadius: 10,   // Number, if you're using buffer + border-radius in css\n    onInit: function () {\n        console.info('onInit')\n    },\n    onSlideStart: function (position, value) {\n        console.info('onSlideStart', 'position: ' + position, 'value: ' + value);\n    },\n    onSlide: function (position, value) {\n        console.log('onSlide', 'position: ' + position, 'value: ' + value);\n    },\n    onSlideEnd: function (position, value) {\n        console.warn('onSlideEnd', 'position: ' + position, 'value: ' + value);\n    }\n});\n\n// update position\nconst triggerEvents = true; // or false\nslider.rangeSlider.update({\n    min : 0,\n    max : 20, \n    step : 0.5,\n    value : 1.5,\n    buffer : 70\n}, triggerEvents);\n\n```\n\n```html\n\u003cinput\n    type=\"range\"\n    min=\"0\"\n    max=\"100\"\n    step=\"1\"\n    data-buffer=\"60\" /\u003e\n```\n\n### Internal APIs:\n```js\n/*\n* @see src/utils/dom.js\n */\nRangeSlider.dom;\n/*\n* @see src/utils/functions.js\n */\nRangeSlider.functions;\nRangeSlider.version;\n\n```\n\n\nUse [JSFiddle](https://jsfiddle.net/Stryzhevskyi/rpsa16fn/) template for issues\n\nAlternative template on [StackBlitz](https://stackblitz.com/edit/rangeslider-pure-example)\n## License\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FStryzhevskyi%2FrangeSlider","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FStryzhevskyi%2FrangeSlider","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FStryzhevskyi%2FrangeSlider/lists"}