document.body.insertAdjacentHTML('afterbegin', ``) // These slider range component was used in my other component: // https://github.com/yairEO/color-picker var settings = { visible: 0, theme: { backgroud: "rgba(0,0,0,.9)", }, CSSVarTarget: document.querySelector('.range-slider'), knobs: [ "Thumb", { cssVar: ['thumb-size', 'px'], label: 'thumb-size', type: 'range', min: 6, max: 33 // value: 16, }, "Value", { cssVar: ['value-active-color'], // alias for the CSS variable label: 'value active color', type: 'color', value: 'white' }, { cssVar: ['value-background'], // alias for the CSS variable label: 'value-background', type: 'color', }, { cssVar: ['value-background-hover'], // alias for the CSS variable label: 'value-background-hover', type: 'color', }, { cssVar: ['primary-color'], // alias for the CSS variable label: 'primary-color', type: 'color', }, { cssVar: ['value-offset-y', 'px'], label: 'value-offset-y', type: 'range', value: 5, min: -10, max: 20 }, "Track", { cssVar: ['track-height', 'px'], label: 'track-height', type: 'range', value: 8, min: 6, max: 33 }, { cssVar: ['progress-radius', 'px'], label: 'progress-radius', type: 'range', value: 20, min: 0, max: 33 }, { cssVar: ['progress-color'], // alias for the CSS variable label: 'progress-color', type: 'color', value: '#EEEEEE' }, { cssVar: ['fill-color'], // alias for the CSS variable label: 'fill-color', type: 'color', value: '#0366D6' }, "Ticks", { cssVar: ['show-min-max'], label: 'hide min/max', type: 'checkbox', value: 'none' }, { cssVar: ['ticks-thickness', 'px'], label: 'ticks-thickness', type: 'range', value: 1, min: 0, max: 10 }, { cssVar: ['ticks-height', 'px'], label: 'ticks-height', type: 'range', value: 5, min: 0, max: 15 }, { cssVar: ['ticks-gap', 'px'], label: 'ticks-gap', type: 'range', value: 5, min: 0, max: 15 }, { cssVar: ['min-max-x-offset', '%'], label: 'min-max-x-offset', type: 'range', value: 10, step: 1, min: 0, max: 100 }, { cssVar: ['min-max-opacity'], label: 'min-max-opacity', type: 'range', value: .5, step: .1, min: 0, max: 1 }, { cssVar: ['ticks-color'], // alias for the CSS variable label: 'ticks-color', type: 'color', value: '#AAAAAA' }, ] } new Knobs(settings)