{"id":5401,"date":"2020-02-10T15:38:20","date_gmt":"2020-02-10T15:38:20","guid":{"rendered":"https:\/\/webdevtrick.com\/?p=5401"},"modified":"2020-02-10T15:38:20","modified_gmt":"2020-02-10T15:38:20","slug":"custom-range-slider","status":"publish","type":"post","link":"https:\/\/webdevtrick.com\/custom-range-slider\/","title":{"rendered":"Custom Range Slider Using CSS and JavaScript | input type=&#8221;range&#8221;"},"content":{"rendered":"<p><strong>How we can customize a range input using HTML, CSS, JavaScript? Solution: See this Custom Range Slider Using CSS and JavaScript, &lt;input type=&#8221;range&#8221;&gt; with Dual Handle.<\/strong><\/p>\n<p>Previously I have shared some <span><a href=\"https:\/\/webdevtrick.com\/tag\/range-slider\/\" target=\"_blank\" rel=\"noopener noreferrer\">range slider<\/a><\/span> programs, this is a <strong>customized<\/strong> and stylish version of <strong>range slider<\/strong>. Basically, the HTML <strong>&lt;input type=&#8221;range&#8221;&gt;<\/strong> tag defines a control for choosing an value by sliding like a <strong>slider control<\/strong>. The default <b>range<\/b> of this tag is 0 to 100, but we can put your numbers and values. By default, this has no styles but we can <span><a href=\"https:\/\/webdevtrick.com\/tag\/customize\" target=\"_blank\" rel=\"noopener noreferrer\">customize<\/a><\/span> it using CSS and JavaScript.<\/p>\n<p>Today you will learn to <strong>customize a &lt;input type=&#8221;range&#8221;&gt; tag<\/strong> and make it stylish. Basically, there is a range slider with 2<strong> thumbs or handles<\/strong> and below the bar, there are numbers for showing values. On the right and left both sides have a <strong>minimum and a maximum<\/strong> number of values. Above the handles, there is a <span><a href=\"https:\/\/webdevtrick.com\/bootstrap-tooltip-progress-bar\/\" target=\"_blank\" rel=\"noopener noreferrer\">tooltip<\/a><\/span> type element for showing the current or selected value.<\/p>\n<p>So, today I am sharing <strong>Custom Range Slider<\/strong> Using <strong>CSS and JavaScript<\/strong>. There I have used HTML and CSS for creating the program, also JavaScript has little part in this program. This is a complete program and ready to use on a<strong> start and end values<\/strong> point. You can use this program on your websites like a <span><a href=\"https:\/\/webdevtrick.com\/css-budget-slider\/\" target=\"_blank\" rel=\"noopener noreferrer\"> budget<\/a><\/span> selector or anything else.<\/p>\n<p>If you are thinking now how this <strong>range input program<\/strong> actually is, then see the preview given below.<\/p>\n<h3>Preview Of Customized &lt;input type=&#8221;range&#8221;&gt;<\/h3>\n<p>See this video preview to getting an idea of how this range slider program looks like.<\/p>\n<div style=\"width: 640px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-5401-1\" width=\"640\" height=\"410\" loop autoplay preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/webdevtrick.com\/wp-content\/uploads\/input-type-range.mp4?_=1\" \/><a href=\"https:\/\/webdevtrick.com\/wp-content\/uploads\/input-type-range.mp4\">https:\/\/webdevtrick.com\/wp-content\/uploads\/input-type-range.mp4<\/a><\/video><\/div>\n<a class=\"maxbutton-2 maxbutton maxbutton-demo\" target=\"_blank\" rel=\"noopener\" href=\"https:\/\/webdevtrick.com\/demos\/custom-range-slider\/\"><span class='mb-text'>Live Demo<\/span><\/a>\n<p>Now you can see this range program visually, also you can see it live by pressing the button given above. If you like this, then get the <strong>source code<\/strong> of its.<\/p>\n<p><span style=\"font-size: 14pt;\">You May Also Like:<\/span><\/p>\n<ul>\n \t<span><\/p>\n<li><a href=\"https:\/\/webdevtrick.com\/jquery-splitter-with-bootstrap\/\" target=\"_blank\" rel=\"noopener noreferrer\">jQuery Vertical Splitter<\/a><\/li>\n<li><a href=\"https:\/\/webdevtrick.com\/custom-select-dropdown-options\/\" target=\"_blank\" rel=\"noopener noreferrer\">Custom Select Dropdown<\/a><\/li>\n<li><a href=\"https:\/\/webdevtrick.com\/css-overlapping-elements\/\" target=\"_blank\" rel=\"noopener noreferrer\">CSS Overlapping Elements<\/a><\/li>\n<li><a href=\"https:\/\/webdevtrick.com\/css-moving-input-focus-effect\/\" target=\"_blank\" rel=\"noopener noreferrer\">Moving Input Focus Effect<\/a><\/li>\n<p><\/span>\n<\/ul>\n<h2>Custom Range Slider Using CSS and JavaScript Source Code<\/h2>\n<p>Before <strong>sharing source code<\/strong>, let&#8217;s talk about it. First I have created the main div with a class name &#8216;wrap&#8217; and in the div tag, I have placed CSS variables using the inline-CSS method. Inside the main div, I have placed 2 <strong>input range<\/strong> sections with <span><a href=\"https:\/\/webdevtrick.com\/tag\/label\" target=\"_blank\" rel=\"noopener noreferrer\">label<\/a><\/span> and output, and a datalist tag to giving options below the bar. Also in the<strong> HTML file<\/strong>, I have linked other files like <strong>CSS and JavaScript<\/strong>.<\/p>\n<p>Now <strong>using CSS<\/strong> I have placed all the elements in the right place, as you can see in the preview. With CSS I have done all the styles and features of this program. There are many <strong>CSS variables<\/strong> for the<strong> store and pass data<\/strong> easily. Also with CSS, I gave basic values like size, color, position, margin, padding, etc to the elements. And there most of the values I have passed using <strong>variables<\/strong>.<\/p>\n<p><strong>JavaScript<\/strong> handling here the <strong>tooltip values update<\/strong> on slides position change feature. There I have used JS <span class=\"lang:default decode:true crayon-inline\">addEventListener<\/span> tag to fetch the user action and update data. Left all other things you will understand after<strong> getting the codes<\/strong>, I can&#8217;t explain all in writing. For creating this program you have to create 3 files. First file for <strong>HTML<\/strong>, second for <strong>CSS<\/strong>, and the third file for <strong>JavaScript<\/strong>.<\/p>\n<p>Follow the steps to creating this program without any error.<\/p>\n<p><span style=\"font-size: 14pt;\">index.html<\/span><\/p>\n<p>Create an HTML file named &#8216;<em><strong>index.html<\/strong><\/em>&#8216; and put these codes given below.<\/p>\n<pre class=\"height-set:true height:750 lang:xhtml decode:true \" title=\"index.html\">&lt;!DOCTYPE html&gt;\r\n&lt;!--Code By Webdevtrick ( https:\/\/webdevtrick.com )--&gt;\r\n&lt;html lang=\"en\" &gt;\r\n&lt;head&gt;\r\n  &lt;meta charset=\"UTF-8\"&gt;\r\n  &lt;title&gt;Custom Range Slider | Webdevtrick.com&lt;\/title&gt;\r\n  &lt;script src=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/prefixfree\/1.0.7\/prefixfree.min.js\"&gt;&lt;\/script&gt;\r\n  &lt;link href=\"https:\/\/fonts.googleapis.com\/css?family=Quicksand:300,600&amp;display=swap\" rel=\"stylesheet\"&gt;\r\n  &lt;link rel=\"stylesheet\" href=\".\/style.css\"&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n\r\n&lt;div class=\"wrap\" role=\"group\" aria-label=\"multi thumb slider with ruler\" style=\"--a: 2; --b: 4; --min: 0; --max: 9; --lbl-a: 20; --lbl-b: 40;\"&gt;\r\n  &lt;label class=\"sr-only\" for=\"a\"&gt;Value A:&lt;\/label&gt;\r\n  &lt;input id=\"a\" type=\"range\" min=\"0\" max=\"9\" value=\"2\" aria-valuetext=\"20\" list=\"l\"\/&gt;\r\n  &lt;output for=\"a\" aria-hidden=\"true\"&gt;&lt;\/output&gt;\r\n  &lt;output for=\"a\" aria-hidden=\"true\"&gt;&lt;\/output&gt;\r\n  &lt;output for=\"a\" aria-hidden=\"true\"&gt;&lt;\/output&gt;\r\n  &lt;label class=\"sr-only\" for=\"a\"&gt;Value B:&lt;\/label&gt;\r\n  &lt;input id=\"b\" type=\"range\" min=\"0\" max=\"9\" value=\"4\" aria-valuetext=\"40\" list=\"l\"\/&gt;\r\n  &lt;output for=\"b\" aria-hidden=\"true\"&gt;&lt;\/output&gt;\r\n  &lt;output for=\"b\" aria-hidden=\"true\"&gt;&lt;\/output&gt;\r\n  &lt;output for=\"b\" aria-hidden=\"true\"&gt;&lt;\/output&gt;\r\n  &lt;datalist id=\"l\"&gt;\r\n    &lt;option value=\"0\" label=\"0\"&gt;0&lt;\/option&gt;\r\n    &lt;option value=\"1\" label=\"10\"&gt;10&lt;\/option&gt;\r\n    &lt;option value=\"2\" label=\"20\"&gt;20&lt;\/option&gt;\r\n    &lt;option value=\"3\" label=\"30\"&gt;30&lt;\/option&gt;\r\n    &lt;option value=\"4\" label=\"40\"&gt;40&lt;\/option&gt;\r\n    &lt;option value=\"5\" label=\"50\"&gt;50&lt;\/option&gt;\r\n    &lt;option value=\"6\" label=\"60\"&gt;60&lt;\/option&gt;\r\n    &lt;option value=\"7\" label=\"70\"&gt;70&lt;\/option&gt;\r\n    &lt;option value=\"8\" label=\"80\"&gt;80&lt;\/option&gt;\r\n    &lt;option value=\"9\" label=\"90\"&gt;90&lt;\/option&gt;\r\n  &lt;\/datalist&gt;\r\n&lt;\/div&gt;\r\n&lt;script  src=\"function.js\"&gt;&lt;\/script&gt;\r\n\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n<\/pre>\n<p><span style=\"font-size: 14pt;\">style.css<\/span><\/p>\n<p>Now create a CSS file named &#8216;<em><strong>style.css<\/strong><\/em>&#8216; and put these codes given here.<\/p>\n<pre class=\"height-set:true height:750 lang:css decode:true \" title=\"style.css\">\/* Code By Webdevtrick ( https:\/\/webdevtrick.com ) *\/\r\n.wrap::before, .wrap::after, input[type='range'] {\r\n  grid-column: 2;\r\n  grid-row: 2;\r\n  place-self: center;\r\n  width: var(--track-w);\r\n  pointer-events: none;\r\n}\r\n\r\n* {\r\n  --hl: 0;\r\n  --nothl: calc(1 - var(--hl));\r\n  margin: 0;\r\n  padding: 0;\r\n  background: none;\r\n  font: inherit;\r\n}\r\n\r\nhtml {\r\n  --i: var(--wide, 1);\r\n  --j: var(--narr, 0);\r\n  --notj: calc(1 - var(--j));\r\n  display: grid;\r\n  place-content: center;\r\n  overflow-x: hidden;\r\n  height: 100vh;\r\n  background: #ff4e4e;\r\n  color: #fff;\r\n  font: 300 1em\/ 1.5 quicksand, trebuchet ms, sans-serif;\r\n}\r\n@media (min-width: 750px) {\r\n  html {\r\n    font-size: 1.25em;\r\n  }\r\n}\r\n@media (max-width: 570px) {\r\n  html {\r\n    --wide: 0 ;\r\n  }\r\n}\r\n@media (max-width: 440px) {\r\n  html {\r\n    --narr: 1 ;\r\n  }\r\n}\r\n@media (max-width: 320px) {\r\n  html {\r\n    font-size: 0.75em;\r\n  }\r\n}\r\nhtml:not(.js) output, html:not(.js) .wrap::after {\r\n  visibility: hidden;\r\n}\r\n\r\n.wrap {\r\n  --u: calc(var(--notj)*2.75rem + var(--j)*10vw);\r\n  --n-cols: calc(var(--max) + 1);\r\n  --middl-w: calc(var(--n-cols)*var(--u));\r\n  --label-w: calc(var(--i)*5rem);\r\n  --track-w: calc(var(--middl-w) - var(--u) + 1.5rem);\r\n  --m: calc(.5*(var(--a) + var(--b)));\r\n  display: grid;\r\n  grid-auto-flow: row dense;\r\n  grid-template-rows: 3rem max-content 3rem;\r\n  grid-template-columns: var(--label-w) var(--middl-w) var(--label-w);\r\n  filter: brightness(0.8);\r\n}\r\n.wrap::before, .wrap::after {\r\n  z-index: -1;\r\n  height: 1rem;\r\n  border-radius: 1rem;\r\n  content: \"\";\r\n}\r\n.wrap::before {\r\n  box-shadow: 0 1px #fc7444;\r\n  background: linear-gradient(#fc3b3b, #e60023);\r\n}\r\n.wrap::after {\r\n  background: #ecebe9;\r\n  --mask:\r\n  \tlinear-gradient(90deg,\r\n    #fc3b3b calc(0.75rem + var(--a)*var(--u)),\r\n  \t\t\ttransparent 0),\r\n  \tlinear-gradient(90deg,\r\n    #fc3b3b calc(0.75rem + var(--b)*var(--u)),\r\n  \t\t\ttransparent 0);\r\n  -webkit-mask: var(--mask);\r\n  -webkit-mask-composite: xor;\r\n  mask: var(--mask);\r\n  mask-composite: exclude;\r\n}\r\n.wrap:focus-within {\r\n  filter: none;\r\n}\r\n\r\n.sr-only {\r\n  position: absolute;\r\n  -webkit-clip-path: inset(50%);\r\n  clip-path: inset(50%);\r\n}\r\n\r\ninput[type='range'] {\r\n  min-height: 2.25rem;\r\n  height: 1.5rem;\r\n  background: none;\r\n}\r\ninput[type='range'], input[type='range']::-webkit-slider-thumb, input[type='range']::-webkit-slider-runnable-track {\r\n  -webkit-appearance: none;\r\n}\r\ninput[type='range']::-webkit-slider-runnable-track {\r\n  border: none;\r\n  padding: 0;\r\n  width: 100%;\r\n  height: 1rem;\r\n  background: none;\r\n  color: transparent;\r\n}\r\ninput[type='range']::-moz-range-track {\r\n  border: none;\r\n  padding: 0;\r\n  width: 100%;\r\n  height: 1rem;\r\n  background: none;\r\n  color: transparent;\r\n}\r\ninput[type='range']::-ms-track {\r\n  border: none;\r\n  padding: 0;\r\n  width: 100%;\r\n  height: 1rem;\r\n  background: none;\r\n  color: transparent;\r\n}\r\ninput[type='range']::-ms-fill-lower {\r\n  display: none;\r\n}\r\ninput[type='range']::-webkit-slider-thumb {\r\n  box-sizing: border-box;\r\n  margin-top: calc(.5*(1rem - 1.5rem));\r\n  border: none;\r\n  width: 1.5rem;\r\n  height: 1.5rem;\r\n  border-radius: 50%;\r\n  box-shadow: 0 1px 0.125em rgba(174, 114, 90, 0.5), 0 1px 0.25em rgba(174, 114, 90, 0.5);\r\n  background: #eae9ea;\r\n  transition: none;\r\n  pointer-events: auto;\r\n  cursor: pointer;\r\n}\r\ninput[type='range']::-moz-range-thumb {\r\n  box-sizing: border-box;\r\n  margin-top: 0;\r\n  border: none;\r\n  width: 1.5rem;\r\n  height: 1.5rem;\r\n  border-radius: 50%;\r\n  box-shadow: 0 1px 0.125em rgba(174, 114, 90, 0.5), 0 1px 0.25em rgba(174, 114, 90, 0.5);\r\n  background: #eae9ea;\r\n  transition: none;\r\n  pointer-events: auto;\r\n  cursor: pointer;\r\n}\r\ninput[type='range']::-ms-thumb {\r\n  box-sizing: border-box;\r\n  margin-top: 0;\r\n  border: none;\r\n  width: 1.5rem;\r\n  height: 1.5rem;\r\n  border-radius: 50%;\r\n  box-shadow: 0 1px 0.125em rgba(174, 114, 90, 0.5), 0 1px 0.25em rgba(174, 114, 90, 0.5);\r\n  background: #eae9ea;\r\n  transition: none;\r\n  pointer-events: auto;\r\n  cursor: pointer;\r\n}\r\ninput[type='range'] + [for] {\r\n  display: grid;\r\n  justify-self: start;\r\n  margin-left: calc(.5*var(--u));\r\n  padding-bottom: .75rem;\r\n  transform: translate(calc(var(--c)*var(--u) - 50%));\r\n}\r\ninput[type='range'] + [for]::after {\r\n  display: block;\r\n  padding: .25em .75em;\r\n  transform-origin: 50% 100%;\r\n  transform: scale(var(--hl));\r\n  border-radius: .25em;\r\n  box-shadow: inset 0 0 2px #ff7747,  inset 0 0 .25em #bc3c0f,  inset 0 0 .5em #cf3f10, 0 1px #fc7444;\r\n  opacity: var(--hl);\r\n  transition: .3s ease-out;\r\n  transition-property: transform, opacity;\r\n}\r\ninput[type='range'], input[type='range'] + [for] {\r\n  grid-column: 2;\r\n}\r\ninput[type='range']:focus {\r\n  outline: solid 0 transparent;\r\n}\r\ninput[type='range']:focus, input[type='range']:focus + [for] {\r\n  --hl: 1 ;\r\n}\r\n\r\noutput[for] {\r\n  grid-row: 1;\r\n  font-size: 1.25em;\r\n  font-weight: 600;\r\n  counter-reset: lbl var(--lbl);\r\n}\r\noutput[for]:after {\r\n  content: counter(lbl) \" px\";\r\n}\r\noutput[for] + output[for] {\r\n  --k: var(--parity, 1);\r\n  --notk: calc(1 - var(--k));\r\n  --sgnk: calc(1 - 2*var(--k));\r\n  grid-column: calc(2*var(--notk) + 1);\r\n  align-self: center;\r\n  justify-self: var(--parity, end);\r\n  overflow: hidden;\r\n  grid-row-end: span 3;\r\n  opacity: calc(4*var(--sgnk)*(var(--c) - var(--m)) + 1);\r\n  color: rgba(255, 255, 255, calc(var(--i)));\r\n}\r\noutput[for]:nth-of-type(3n) {\r\n  --parity: 0;\r\n}\r\n\r\noutput[for='a'] {\r\n  --c: var(--a);\r\n  --lbl: var(--lbl-a) ;\r\n}\r\n\r\noutput[for='b'] {\r\n  --c: var(--b);\r\n  --lbl: var(--lbl-b) ;\r\n}\r\n\r\ndatalist {\r\n  display: grid;\r\n  grid-auto-flow: column;\r\n  grid-row: 3;\r\n  place-self: start stretch;\r\n  width: var(--middl-w);\r\n}\r\n\r\noption {\r\n  display: flex;\r\n  flex-direction: column;\r\n  justify-content: center;\r\n  width: var(--u);\r\n  font-size: var(--notj);\r\n  text-align: center;\r\n}\r\noption::before {\r\n  align-self: center;\r\n  width: 4px;\r\n  height: .75rem;\r\n  box-shadow: inset -1px 0 1px #fc7777;\r\n  background: #9b2f0b;\r\n  content: \"\";\r\n}\r\noption:not(:nth-child(3n + 1)) {\r\n  color: rgba(255, 255, 255, var(--notj));\r\n}<\/pre>\n<p><span style=\"font-size: 14pt;\">function.js<\/span><\/p>\n<p>The last step, create a JavaScript file named &#8216;<em><strong>function.js<\/strong><\/em>&#8216; and put the codes.<\/p>\n<pre class=\"height-set:true height:750 lang:js decode:true \" title=\"function.js\">\/\/ Code By Webdevtrick ( https:\/\/webdevtrick.com )\r\ndocument.documentElement.classList.add('js');\r\n\r\naddEventListener('input', e =&gt; {\r\n\tlet _t = e.target, \r\n\t\t\t_p = _t.parentNode, \r\n\t\t\tval = +_t.value, \r\n\t\t\t_o = _p.querySelector(`option[value='${val}']`), \r\n\t\t\tlbl = +_o.label;\r\n\t\r\n\t_t.setAttribute('aria-valuetext', lbl);\r\n\t_p.style.setProperty(`--${_t.id}`, val);\r\n\t_p.style.setProperty(`--lbl-${_t.id}`, lbl);\r\n}, false);<\/pre>\n<p>That&#8217;s It. Now you have successfully created <strong>Custom Range Slider<\/strong> Using CSS and JavaScript, <strong>input type=&#8221;range&#8221;<\/strong> program customization. If you have any doubt or questions comment down below.<\/p>\n<p><span style=\"font-family: impact, sans-serif;\">Thanks For Visiting, Keep Visiting.<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>How we can customize a range input using HTML, CSS, JavaScript? Solution: See this Custom Range Slider Using CSS and JavaScript, &lt;input type=&#8221;range&#8221;&gt; with Dual Handle. Previously I have shared some range slider programs, this is a customized and stylish version of range slider. Basically, the HTML &lt;input type=&#8221;range&#8221;&gt; tag defines a control for choosing [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":5402,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[43,42,46],"tags":[244,61,272,223,281,67,399,339],"class_list":["post-5401","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-css","category-html","category-javascript","tag-input","tag-javascript-tips-and-tricks","tag-label","tag-range-slider","tag-slider","tag-source-code","tag-tooltip","tag-variable"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Custom Range Slider Using CSS and JavaScript | input type=&quot;range&quot;<\/title>\n<meta name=\"description\" content=\"Want to customize a input range? Check out this Custom Range Slider Using CSS and JavaScript, customized input type=&quot;range&quot; program. Get source code.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/webdevtrick.com\/custom-range-slider\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Custom Range Slider Using CSS and JavaScript | input type=&quot;range&quot;\" \/>\n<meta property=\"og:description\" content=\"Want to customize a input range? Check out this Custom Range Slider Using CSS and JavaScript, customized input type=&quot;range&quot; program. Get source code.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webdevtrick.com\/custom-range-slider\/\" \/>\n<meta property=\"og:site_name\" content=\"Web Dev Trick\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webdevtrick\/\" \/>\n<meta property=\"article:published_time\" content=\"2020-02-10T15:38:20+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/webdevtrick.com\/wp-content\/uploads\/custom-range-slider.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"shaan\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"shaan\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/webdevtrick.com\/custom-range-slider\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/webdevtrick.com\/custom-range-slider\/\"},\"author\":{\"name\":\"shaan\",\"@id\":\"https:\/\/webdevtrick.com\/#\/schema\/person\/c79bae83976f92fe305c22342b2a0be3\"},\"headline\":\"Custom Range Slider Using CSS and JavaScript | input type=&#8221;range&#8221;\",\"datePublished\":\"2020-02-10T15:38:20+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/webdevtrick.com\/custom-range-slider\/\"},\"wordCount\":672,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\/\/webdevtrick.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/webdevtrick.com\/custom-range-slider\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/webdevtrick.com\/wp-content\/uploads\/custom-range-slider.jpg\",\"keywords\":[\"input\",\"javascript tips and tricks\",\"label\",\"range slider\",\"slider\",\"source code\",\"tooltip\",\"variable\"],\"articleSection\":[\"CSS\",\"HTML\",\"JavaScript\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/webdevtrick.com\/custom-range-slider\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/webdevtrick.com\/custom-range-slider\/\",\"url\":\"https:\/\/webdevtrick.com\/custom-range-slider\/\",\"name\":\"Custom Range Slider Using CSS and JavaScript | input type=\\\"range\\\"\",\"isPartOf\":{\"@id\":\"https:\/\/webdevtrick.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/webdevtrick.com\/custom-range-slider\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/webdevtrick.com\/custom-range-slider\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/webdevtrick.com\/wp-content\/uploads\/custom-range-slider.jpg\",\"datePublished\":\"2020-02-10T15:38:20+00:00\",\"description\":\"Want to customize a input range? Check out this Custom Range Slider Using CSS and JavaScript, customized input type=\\\"range\\\" program. Get source code.\",\"breadcrumb\":{\"@id\":\"https:\/\/webdevtrick.com\/custom-range-slider\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webdevtrick.com\/custom-range-slider\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webdevtrick.com\/custom-range-slider\/#primaryimage\",\"url\":\"https:\/\/webdevtrick.com\/wp-content\/uploads\/custom-range-slider.jpg\",\"contentUrl\":\"https:\/\/webdevtrick.com\/wp-content\/uploads\/custom-range-slider.jpg\",\"width\":1200,\"height\":630,\"caption\":\"custom range slider with css and javascript\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webdevtrick.com\/custom-range-slider\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/webdevtrick.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Custom Range Slider Using CSS and JavaScript | input type=&#8221;range&#8221;\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/webdevtrick.com\/#website\",\"url\":\"https:\/\/webdevtrick.com\/\",\"name\":\"Web Dev Trick\",\"description\":\"HTML5, CSS3, JS, PHP Source Code &amp; Tutorial\",\"publisher\":{\"@id\":\"https:\/\/webdevtrick.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/webdevtrick.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/webdevtrick.com\/#organization\",\"name\":\"Web Dev Trick\",\"url\":\"https:\/\/webdevtrick.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webdevtrick.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/webdevtrick.com\/wp-content\/uploads\/logo-fb-1.png\",\"contentUrl\":\"https:\/\/webdevtrick.com\/wp-content\/uploads\/logo-fb-1.png\",\"width\":512,\"height\":512,\"caption\":\"Web Dev Trick\"},\"image\":{\"@id\":\"https:\/\/webdevtrick.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webdevtrick\/\",\"https:\/\/pinterest.com\/webdevtrick\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/webdevtrick.com\/#\/schema\/person\/c79bae83976f92fe305c22342b2a0be3\",\"name\":\"shaan\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webdevtrick.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/60aa6ee93605bda7bc598d11dd748709a69bdb55a080124cc382114d8d7e7665?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/60aa6ee93605bda7bc598d11dd748709a69bdb55a080124cc382114d8d7e7665?s=96&d=mm&r=g\",\"caption\":\"shaan\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Custom Range Slider Using CSS and JavaScript | input type=\"range\"","description":"Want to customize a input range? Check out this Custom Range Slider Using CSS and JavaScript, customized input type=\"range\" program. Get source code.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/webdevtrick.com\/custom-range-slider\/","og_locale":"en_US","og_type":"article","og_title":"Custom Range Slider Using CSS and JavaScript | input type=\"range\"","og_description":"Want to customize a input range? Check out this Custom Range Slider Using CSS and JavaScript, customized input type=\"range\" program. Get source code.","og_url":"https:\/\/webdevtrick.com\/custom-range-slider\/","og_site_name":"Web Dev Trick","article_publisher":"https:\/\/www.facebook.com\/webdevtrick\/","article_published_time":"2020-02-10T15:38:20+00:00","og_image":[{"width":1200,"height":630,"url":"https:\/\/webdevtrick.com\/wp-content\/uploads\/custom-range-slider.jpg","type":"image\/jpeg"}],"author":"shaan","twitter_card":"summary_large_image","twitter_misc":{"Written by":"shaan","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/webdevtrick.com\/custom-range-slider\/#article","isPartOf":{"@id":"https:\/\/webdevtrick.com\/custom-range-slider\/"},"author":{"name":"shaan","@id":"https:\/\/webdevtrick.com\/#\/schema\/person\/c79bae83976f92fe305c22342b2a0be3"},"headline":"Custom Range Slider Using CSS and JavaScript | input type=&#8221;range&#8221;","datePublished":"2020-02-10T15:38:20+00:00","mainEntityOfPage":{"@id":"https:\/\/webdevtrick.com\/custom-range-slider\/"},"wordCount":672,"commentCount":1,"publisher":{"@id":"https:\/\/webdevtrick.com\/#organization"},"image":{"@id":"https:\/\/webdevtrick.com\/custom-range-slider\/#primaryimage"},"thumbnailUrl":"https:\/\/webdevtrick.com\/wp-content\/uploads\/custom-range-slider.jpg","keywords":["input","javascript tips and tricks","label","range slider","slider","source code","tooltip","variable"],"articleSection":["CSS","HTML","JavaScript"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/webdevtrick.com\/custom-range-slider\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/webdevtrick.com\/custom-range-slider\/","url":"https:\/\/webdevtrick.com\/custom-range-slider\/","name":"Custom Range Slider Using CSS and JavaScript | input type=\"range\"","isPartOf":{"@id":"https:\/\/webdevtrick.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/webdevtrick.com\/custom-range-slider\/#primaryimage"},"image":{"@id":"https:\/\/webdevtrick.com\/custom-range-slider\/#primaryimage"},"thumbnailUrl":"https:\/\/webdevtrick.com\/wp-content\/uploads\/custom-range-slider.jpg","datePublished":"2020-02-10T15:38:20+00:00","description":"Want to customize a input range? Check out this Custom Range Slider Using CSS and JavaScript, customized input type=\"range\" program. Get source code.","breadcrumb":{"@id":"https:\/\/webdevtrick.com\/custom-range-slider\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webdevtrick.com\/custom-range-slider\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webdevtrick.com\/custom-range-slider\/#primaryimage","url":"https:\/\/webdevtrick.com\/wp-content\/uploads\/custom-range-slider.jpg","contentUrl":"https:\/\/webdevtrick.com\/wp-content\/uploads\/custom-range-slider.jpg","width":1200,"height":630,"caption":"custom range slider with css and javascript"},{"@type":"BreadcrumbList","@id":"https:\/\/webdevtrick.com\/custom-range-slider\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webdevtrick.com\/"},{"@type":"ListItem","position":2,"name":"Custom Range Slider Using CSS and JavaScript | input type=&#8221;range&#8221;"}]},{"@type":"WebSite","@id":"https:\/\/webdevtrick.com\/#website","url":"https:\/\/webdevtrick.com\/","name":"Web Dev Trick","description":"HTML5, CSS3, JS, PHP Source Code &amp; Tutorial","publisher":{"@id":"https:\/\/webdevtrick.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/webdevtrick.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/webdevtrick.com\/#organization","name":"Web Dev Trick","url":"https:\/\/webdevtrick.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webdevtrick.com\/#\/schema\/logo\/image\/","url":"https:\/\/webdevtrick.com\/wp-content\/uploads\/logo-fb-1.png","contentUrl":"https:\/\/webdevtrick.com\/wp-content\/uploads\/logo-fb-1.png","width":512,"height":512,"caption":"Web Dev Trick"},"image":{"@id":"https:\/\/webdevtrick.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webdevtrick\/","https:\/\/pinterest.com\/webdevtrick\/"]},{"@type":"Person","@id":"https:\/\/webdevtrick.com\/#\/schema\/person\/c79bae83976f92fe305c22342b2a0be3","name":"shaan","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webdevtrick.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/60aa6ee93605bda7bc598d11dd748709a69bdb55a080124cc382114d8d7e7665?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/60aa6ee93605bda7bc598d11dd748709a69bdb55a080124cc382114d8d7e7665?s=96&d=mm&r=g","caption":"shaan"}}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/webdevtrick.com\/wp-json\/wp\/v2\/posts\/5401","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webdevtrick.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webdevtrick.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webdevtrick.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/webdevtrick.com\/wp-json\/wp\/v2\/comments?post=5401"}],"version-history":[{"count":10,"href":"https:\/\/webdevtrick.com\/wp-json\/wp\/v2\/posts\/5401\/revisions"}],"predecessor-version":[{"id":5413,"href":"https:\/\/webdevtrick.com\/wp-json\/wp\/v2\/posts\/5401\/revisions\/5413"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/webdevtrick.com\/wp-json\/wp\/v2\/media\/5402"}],"wp:attachment":[{"href":"https:\/\/webdevtrick.com\/wp-json\/wp\/v2\/media?parent=5401"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webdevtrick.com\/wp-json\/wp\/v2\/categories?post=5401"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webdevtrick.com\/wp-json\/wp\/v2\/tags?post=5401"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}