# ng-round-slider

Angular library with implementation of [Round Slider JQuery Plugin](https://roundsliderui.com) using [JQuery](https://www.npmjs.com/package/jquery) and [round-slider](https://www.npmjs.com/package/round-slider) packages.

## Motivation

Sometime ago I needed a round slider as a map control. I didn't find a suitable for me vanilla (html, css, js) solution (but I googled about 2 hours). Only option was as mentioned earlier [JQuery Plugin](https://roundsliderui.com). I integrated it to my Angular application. I dreamed it would be a separate library I could reuse...

## Usage

1. Install library:

```bash
npm i ng-round-slider
```

2. Import the component:

```typescript
// ...
import { NgRoundSliderComponent } from 'ng-round-slider';

@Component({
  // ...
  imports: [NgRoundSliderComponent]
})
export class SomeComponent {
  // ...
}
```

3. Add in template:

```html
<ng-round-slider></ng-round-slider>
```

## Input properties

> [!IMPORTANT]  
> All input properties are optional. If you didn't provide a value, it would set default value.

| Name              | Type             | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | Default |
|:-----------------:|:----------------:|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |:-------:|
| animation         | boolean          | <p style="box-sizing: border-box; font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif;">Enables or disables the handle movement animation.</p><p style="box-sizing: border-box; font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif;">As the control uses the CSS3 animation, so you can use any CSS3 transition effects to customize the animation type and speed. To know how to use custom animation check <a target="_blank" href="https://roundsliderui.com/demos.html#custom-animation" style="box-sizing: border-box;">here</a>.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | true    |
| width             | number           | <span style="font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif; background-color: rgb(255, 255, 255);">Indicates the width (or thickness) of the slider.</span>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | 18      |
| circleShape       | string           | <p style="box-sizing: border-box; font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif;">Indicates the circle shape to be render. The available circle shapes are:</p><ul style="box-sizing: border-box; font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif;"><li style="box-sizing: border-box;">full</li><li style="box-sizing: border-box;">half-top</li><li style="box-sizing: border-box;">half-bottom</li><li style="box-sizing: border-box;">half-left</li><li style="box-sizing: border-box;">half-right</li><li style="box-sizing: border-box;">quarter-top-left</li><li style="box-sizing: border-box;">quarter-top-right</li><li style="box-sizing: border-box;">quarter-bottom-right</li><li style="box-sizing: border-box;">quarter-bottom-left</li><li style="box-sizing: border-box;">pie</li><li style="box-sizing: border-box;">custom-half</li><li style="box-sizing: border-box;">custom-quarter</li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         | full    |
| disabled          | boolean          | <p style="box-sizing: border-box; font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif; background-color: rgb(255, 255, 255);">Sets the disable state or enable state of the control. While the control in the disable state we can't interact with this.</p><p style="box-sizing: border-box; font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif; background-color: rgb(255, 255, 255);">And in disable mode the control looks like in the blured state.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         | false   |
| editableTooltip   | boolean          | <span style="font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif;">Enables the editable option of tooltip. When this property set as true, we can change the value by editing the tooltip.</span>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | true    |
| endAngle          | string \| number | <p style="box-sizing: border-box; font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif; background-color: rgb(255, 255, 255);">Indicates the end point of the slider.</p><p style="box-sizing: border-box; font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif; background-color: rgb(255, 255, 255);"><b style="box-sizing: border-box;">Multiple format supported:</b></p><ul style="box-sizing: border-box; font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif; background-color: rgb(255, 255, 255);"><li style="box-sizing: border-box;"><code style="box-sizing: border-box; padding: 1px 5px; background: rgb(102, 102, 102); font-weight: bold; text-align: center; min-width: 50px; display: inline-block; font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif; font-size: 13px; color: rgb(250, 250, 250);">180</code> : Sets the fixed value, where the endAngle is 180°.</li><li style="box-sizing: border-box;"><code style="box-sizing: border-box; padding: 1px 5px; background: rgb(102, 102, 102); font-weight: bold; text-align: center; min-width: 50px; display: inline-block; font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif; font-size: 13px; color: rgb(250, 250, 250);">"+180"</code> : This is dependent to <a class="link" href="https://roundsliderui.com/document.html#startAngle" style="box-sizing: border-box;">startAngle</a> property. If the startAngle is 90° then the endAngle considered as 270°.</li><li style="box-sizing: border-box;"><code style="box-sizing: border-box; padding: 1px 5px; background: rgb(102, 102, 102); font-weight: bold; text-align: center; min-width: 50px; display: inline-block; font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif; font-size: 13px; color: rgb(250, 250, 250);">"-90"</code> : This is also dependent to <a class="link" href="https://roundsliderui.com/document.html#startAngle" style="box-sizing: border-box;">startAngle</a> property. If the startAngle is 180° then the endAngle considered as 90°.</li></ul><p style="box-sizing: border-box; font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif; background-color: rgb(255, 255, 255);"></p><p style="box-sizing: border-box; font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif; background-color: rgb(255, 255, 255);">The endAngle property is applicable for "full" circle shape only.</p> | +360    |
| handleSize        | string \| number | <p style="box-sizing: border-box; font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif;">The handleSize property mentions the size of the handle.</p><p style="box-sizing: border-box; font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif;"><b style="box-sizing: border-box;">Multiple format supported:</b></p><ul style="box-sizing: border-box; font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif;"><li style="box-sizing: border-box;"><code style="box-sizing: border-box; padding: 1px 5px; background: rgb(102, 102, 102); font-weight: bold; text-align: center; min-width: 50px; display: inline-block; font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif; font-size: 13px; color: rgb(250, 250, 250);">22</code> : Sets the fixed size, where the handle's height and width considered as 22.</li><li style="box-sizing: border-box;"><code style="box-sizing: border-box; padding: 1px 5px; background: rgb(102, 102, 102); font-weight: bold; text-align: center; min-width: 50px; display: inline-block; font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif; font-size: 13px; color: rgb(250, 250, 250);">"30,10"</code> : Sets the fixed size, where the handle's height considered as 30 and width considered as 10.</li><li style="box-sizing: border-box;"><code style="box-sizing: border-box; padding: 1px 5px; background: rgb(102, 102, 102); font-weight: bold; text-align: center; min-width: 50px; display: inline-block; font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif; font-size: 13px; color: rgb(250, 250, 250);">"+4"</code> : This is dependent to <a class="link" href="https://roundsliderui.com/document.html#width" style="box-sizing: border-box;">width</a> property. If the width is 20 then the handleSize considered as 24.</li><li style="box-sizing: border-box;"><code style="box-sizing: border-box; padding: 1px 5px; background: rgb(102, 102, 102); font-weight: bold; text-align: center; min-width: 50px; display: inline-block; font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif; font-size: 13px; color: rgb(250, 250, 250);">"-4"</code> : This is also dependent to <a class="link" href="https://roundsliderui.com/document.html#width" style="box-sizing: border-box;">width</a> property. If the width is 20 then the handleSize considered as 16.</li></ul>                                            | +0      |
| handleShape       | string           | <p style="box-sizing: border-box; font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif; background-color: rgb(255, 255, 255);">The handleShape property mentions the shape of the handle. Currently the following types are available:</p><ul style="box-sizing: border-box; font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif; background-color: rgb(255, 255, 255);"><li style="box-sizing: border-box;">round</li><li style="box-sizing: border-box;">dot</li><li style="box-sizing: border-box;">square</li></ul><p style="box-sizing: border-box; font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif; background-color: rgb(255, 255, 255);">In addition you can make your own handle shape by customizing this. Please check <a class="link" href="https://roundsliderui.com/demos.html#custom-handle-shape" style="box-sizing: border-box;">here</a> for handle customization.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | round   |
| keyboardAction    | boolean          | <p style="box-sizing: border-box; font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif;">Enables or disables the keyboard functionality.</p><p style="box-sizing: border-box; font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif;">The slider value can be changed through the keyboard by using the arrow keys (Up, Down, Left, Right) and Home, Down keys.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | truу    |
| lineCap           | string           | <p style="box-sizing: border-box; font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif; background-color: rgb(255, 255, 255);">The lineCap property mentions the shape at the end part of the path. This is not applicable for the "full" <a class="link" href="https://roundsliderui.com/document.html#circleShape" style="box-sizing: border-box;">circle shape</a>, except this all other circle shapes supports lineCap.</p><p style="box-sizing: border-box; font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif; background-color: rgb(255, 255, 255);">The possible inputs for this property is:</p><ul style="box-sizing: border-box; font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif; background-color: rgb(255, 255, 255);"><li style="box-sizing: border-box;">square</li><li style="box-sizing: border-box;">round</li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | butt    |
| max               | number           | <span style="font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif;">The max property indicates the maximum value of the slider.</span>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         | 100     |
| min               | number           | <span style="font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif; background-color: rgb(255, 255, 255);">The min property indicates the minimum value of the slider.</span>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | 0       |
| mouseScrollAction | boolean          | <p style="box-sizing: border-box; font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif;">Enables or disables the mouse scroll functionality.</p><p style="box-sizing: border-box; font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif;">The slider value can be changed through the mouse scrolling.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | false   |
| radius            | number           | <p style="box-sizing: border-box; font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif; background-color: rgb(255, 255, 255);">The radius property indicates the radius of the slider's circle.</p><p style="box-sizing: border-box; font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif; background-color: rgb(255, 255, 255);"><b style="box-sizing: border-box;">Note : </b>The height and width of the control considered as (2 * radius).</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | 85      |
| readOnly          | boolean          | <span style="font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif;">This enables the control into the readOnly mode, so we can can't interact with the control when readOnly enabled.</span>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | false   |
| showTooltip       | boolean          | <span style="font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif; background-color: rgb(255, 255, 255);">Enables or disables the tooltip inside the slider.</span>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | true    |
| sliderType        | string           | <p style="box-sizing: border-box; font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif;">Indicates the slider type to be render. The available slider types are:</p><ul style="box-sizing: border-box; font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif;"><li style="box-sizing: border-box;">default</li><li style="box-sizing: border-box;">min-range</li><li style="box-sizing: border-box;">range</li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | default |
| startAngle        | number           | <p style="box-sizing: border-box; font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif; background-color: rgb(255, 255, 255);">Indicates the starting point of the slider.</p><p style="box-sizing: border-box; font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif; background-color: rgb(255, 255, 255);">The startAngle property is applicable for "full", "custom-half", "custom-quarter" and "pie" circle shapes only.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | 0       |
| startValue        | number           | <p style="box-sizing: border-box; font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif;">This property decides at which point the slider should start. Otherwise, by default the slider starts with min value.</p><p style="box-sizing: border-box; font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif;">This is mainly used for min-range slider, where you can customize the min-range start position.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | null    |
| step              | number           | <span style="font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif; background-color: rgb(255, 255, 255);">Decides the number of steps or value should take while we move the handle.</span>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | 1       |
| value             | string \| number | <p style="box-sizing: border-box; font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif;">Sets or gets the value of the slider.</p><p style="box-sizing: border-box; font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif;"></p><p style="box-sizing: border-box; font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif;"></p><div style="box-sizing: border-box; font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif;">For default and min-range slider the property allows a single value (<b style="box-sizing: border-box;">ex:</b> value - 10).</div><div style="box-sizing: border-box; font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif;">For range slider the property allows two values separated by comma (<b style="box-sizing: border-box;">ex:</b> value - "30,60").</div>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         | null    |
| svgMode           | boolean          | <p style="box-sizing: border-box; font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif; background-color: rgb(255, 255, 255);">This will enables the slider into the SVG mode.</p><p style="box-sizing: border-box; font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif; background-color: rgb(255, 255, 255);">Through SVG mode you can do a lot of customization, and it will resolve all the legacy issues.</p><p style="box-sizing: border-box; font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif; background-color: rgb(255, 255, 255);"><b style="box-sizing: border-box;">Note : </b>It is recommended to use the SVG mode for better usability and customization.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | false   |
| borderWidth       | number           | <p style="box-sizing: border-box; font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif;">Indicates the border width of the slider.</p><p style="box-sizing: border-box; font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif;"><b style="box-sizing: border-box;">Note : </b>This is only applicable for <a class="link" href="https://roundsliderui.com/document.html#svgMode" style="box-sizing: border-box;">SVG mode</a></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | 1       |
| borderColor       | string           | <span style="font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif; background-color: rgb(255, 255, 255);">Sets the border color of the slider.</span>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | null    |
| pathColor         | string           | <span style="font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif;">Sets the path color of the slider.</span>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | null    |
| rangeColor        | string           | <span style="font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif; background-color: rgb(255, 255, 255);">Sets the range color of the slider.</span>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | null    |
| tooltipColor      | string           | <span style="font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif;">Sets the tooltip color of the slider.</span>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | null    |
| tooltipFormat     | callback         | <p style="box-sizing: border-box; font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif; background-color: rgb(255, 255, 255);">This event will act as a callback. So you can customize the tooltip template by returning with the custom values here.</p><p style="box-sizing: border-box; font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif; background-color: rgb(255, 255, 255);">Check the below demo for better understanding:</p><ul style="box-sizing: border-box; font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif; background-color: rgb(255, 255, 255);"><li style="box-sizing: border-box;"><a target="_blank" href="https://roundsliderui.com/demos.html#custom-tooltip" style="box-sizing: border-box;">Custom Tooltip</a></li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         | null    |

## Output properties

| Name              | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
|:-----------------:|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| beforeCreate      | <p style="box-sizing: border-box; font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif; text-align: start;">This event triggered before the control will initialize.</p><p style="box-sizing: border-box; font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif; text-align: start;">At this point we can change the control's settings. And also this event can be cancellable, so we can prevent the control creation by 'return false'.</p>                                                                                  |
| create            | <span style="font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif; background-color: rgb(255, 255, 255);">This event triggered after the control creation or initialization.</span>                                                                                                                                                                                                                                                                                                                                                                   |
| start             | <span style="font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif;">This event triggered when the user starts to drag the handle.</span>                                                                                                                                                                                                                                                                                                                                                                                                              |
| stop              | <span style="font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif; background-color: rgb(255, 255, 255);">This event triggered when the user stops from sliding the handle / when releasing the handle.</span>                                                                                                                                                                                                                                                                                                                                        |
| beforeValueChange | <p style="box-sizing: border-box; font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif;">This event will be triggered before the value change happens.</p><p style="box-sizing: border-box; font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif;">And this event can be cancellable. So whenever you want to restrict the slider for particular values at that time this will be useful.</p>                                                                                                                                  |
| drag              | <span style="font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif; background-color: rgb(255, 255, 255);">This event triggered when the user moving the handle. On each mouse move the drag event will trigger.</span>                                                                                                                                                                                                                                                                                                                                |
| change            | <span style="font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif;">This event triggered when the slider's value gets change.</span>                                                                                                                                                                                                                                                                                                                                                                                                                  |
| update            | <p style="box-sizing: border-box; font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif; background-color: rgb(255, 255, 255);">This event is the combination of <b style="box-sizing: border-box;">'drag'</b> and <b style="box-sizing: border-box;">'change'</b> events.</p><p style="box-sizing: border-box; font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif; background-color: rgb(255, 255, 255);">Simply, whenever the slider value gets updated through the user interaction at that time it will be triggered.</p> |
| valueChange       | <span style="font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif;">This event is similar to </span><b style="box-sizing: border-box; font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif;">'update'</b><span style="font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif;"> event, in addition it will trigger even the value was changed through programmatically also.</span>                                                                                                                       |

## Methods

| Name           | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
|:--------------:|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| setValue       | <p style="box-sizing: border-box; font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif;">This method is used to set the value to the slider control.</p><p style="box-sizing: border-box; font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif;"><b style="box-sizing: border-box;">Note : </b>This method accepts the following possible parameters.</p><ul style="box-sizing: border-box; font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif;"><li style="box-sizing: border-box;"><b style="box-sizing: border-box;">setValue(value)</b> : This will set the corresponding value to the slider handle.<pre style="box-sizing: border-box; background-color: rgb(238, 238, 238); border-width: 1px 1px 1px 5px; border-style: solid; border-color: rgb(221, 221, 221); border-image: initial; padding: 15px 0px 15px 25px; overflow: auto;"><code style="box-sizing: border-box; padding: 0px;">setValue(30) - for default and min-range slider </code></pre></li><li style="box-sizing: border-box;"><b style="box-sizing: border-box;">setValue(value, index)</b> : This is only applicable for range slider, which sets the value to the corresponding handle.Here the possible value of index is 1 or 2 only.<pre style="box-sizing: border-box; background-color: rgb(238, 238, 238); border-width: 1px 1px 1px 5px; border-style: solid; border-color: rgb(221, 221, 221); border-image: initial; padding: 15px 0px 15px 25px; overflow: auto;"><code style="box-sizing: border-box; padding: 0px;">setValue(35, 1) - it sets the first handle value as 35</code></pre></li></ul> |
| getValue       | <p style="box-sizing: border-box; font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif; background-color: rgb(255, 255, 255);">This method is used to get the value from the slider control.</p><p style="box-sizing: border-box; font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif; background-color: rgb(255, 255, 255);"><b style="box-sizing: border-box;">Note : </b>This method accepts the following possible parameters.</p><ul style="box-sizing: border-box; font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif; background-color: rgb(255, 255, 255);"><li style="box-sizing: border-box;"><b style="box-sizing: border-box;">getValue()</b> : Without any parameter, it will return the current slider value.<pre style="box-sizing: border-box; background-color: rgb(238, 238, 238); border-width: 1px 1px 1px 5px; border-style: solid; border-color: rgb(221, 221, 221); border-image: initial; padding: 15px 0px 15px 25px; overflow: auto;"><code style="box-sizing: border-box; padding: 0px;">getValue() - returns 30 for default and min-range slider; getValue() - returns "30,60" for range slider </code></pre></li><li style="box-sizing: border-box;"><b style="box-sizing: border-box;">getValue(index)</b> : This is only applicable for range slider, which returns the value of the corresponding handle. Here the possible value of index is 1 or 2 only.<pre style="box-sizing: border-box; background-color: rgb(238, 238, 238); border-width: 1px 1px 1px 5px; border-style: solid; border-color: rgb(221, 221, 221); border-image: initial; padding: 15px 0px 15px 25px; overflow: auto;"><code style="box-sizing: border-box; padding: 0px;">getValue(1) - it returns the first handle value</code></pre></li></ul> |
| refreshTooltip | <p style="box-sizing: border-box; font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif;">This method is used to refresh the tooltip position, when it is misaligned.</p><p style="box-sizing: border-box; font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif;">Mostly when you render the slider at <b style="box-sizing: border-box;">'display: none'</b> mode then the tooltip may misaligned. At this point, if needed then you can refresh the tooltip once when the slider become <b style="box-sizing: border-box;">'display: block'</b>.</p><pre style="box-sizing: border-box; background-color: rgb(238, 238, 238); border-width: 1px 1px 1px 5px; border-style: solid; border-color: rgb(221, 221, 221); border-image: initial; padding: 15px 0px 15px 25px; overflow: auto;"><code style="box-sizing: border-box; padding: 0px;">$("#slider").roundSlider("refreshTooltip");</code></pre><p style="box-sizing: border-box; font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif;"><b style="box-sizing: border-box;">Hint :</b></p><ul style="box-sizing: border-box; font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif;"><li style="box-sizing: border-box;"><p style="box-sizing: border-box;">More likely, with the above mentioned situation, when you are using tooltip as custom template then only you may need to think about this.</p><p style="box-sizing: border-box;">Rest of the times you don't need to worry about this.</p></li></ul>                                                                                                                                                                                                                                                                  |
| disable        | <p style="box-sizing: border-box; font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif; background-color: rgb(255, 255, 255);">Disables the slider control.</p><p style="box-sizing: border-box; font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif; background-color: rgb(255, 255, 255);"><b style="box-sizing: border-box;">Note : </b>This method does not accept any parameters.</p><pre style="box-sizing: border-box; background-color: rgb(238, 238, 238); border-width: 1px 1px 1px 5px; border-style: solid; border-color: rgb(221, 221, 221); border-image: initial; padding: 15px 0px 15px 25px; overflow: auto;"><code style="box-sizing: border-box; padding: 0px;">$("#slider").roundSlider("disable");</code></pre>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| enable         | <p style="box-sizing: border-box; font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif;">Enables the slider control.</p><p style="box-sizing: border-box; font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif;"><b style="box-sizing: border-box;">Note : </b>This method does not accept any parameters.</p><pre style="box-sizing: border-box; background-color: rgb(238, 238, 238); border-width: 1px 1px 1px 5px; border-style: solid; border-color: rgb(221, 221, 221); border-image: initial; padding: 15px 0px 15px 25px; overflow: auto;"><code style="box-sizing: border-box; padding: 0px;">$("#slider").roundSlider("enable");</code></pre>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| destroy        | <p style="box-sizing: border-box; font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif; background-color: rgb(255, 255, 255);">Destroys the slider control and reverts the control element to the initial state.</p><p style="box-sizing: border-box; font-family: &quot;Open Sans&quot;, &quot;Segoe UI&quot;, Arial, sans-serif; background-color: rgb(255, 255, 255);"><b style="box-sizing: border-box;">Note : </b>This method does not accept any parameters.</p><pre style="box-sizing: border-box; background-color: rgb(238, 238, 238); border-width: 1px 1px 1px 5px; border-style: solid; border-color: rgb(221, 221, 221); border-image: initial; padding: 15px 0px 15px 25px; overflow: auto;"><code style="box-sizing: border-box; padding: 0px;">$("#slider").roundSlider("destroy");</code></pre>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |

> [!NOTE]  
> You can see scripts for library in [root README](../../README.md).
