Slider
Picks a number or an interval by dragging.
When to use
- Use it when the approximate value matters more than the exact one.
Examples
Value and interval
Loading the example
<k:Stack gap="18">
<k:Slider label="Discount" value="15" max="50" unit="%"/>
<k:Slider label="Price" range="true" value="200" to="750" max="1000" step="10" unit="TRY"/>
</k:Stack>API
Properties
| Name | Type | Default | Description |
|---|---|---|---|
value | float | 0 | Value, or the start of the interval |
to | float | 100 | End of the interval |
range | boolean | false | Whether to select an interval |
min | float | 0 | Minimum |
max | float | 100 | Maximum |
step | float | 1 | Step |
decimals | int | 0 | Decimal places |
unit | string | Unit | |
label | string | Label | |
help | string | Help text | |
enabled | boolean | true | Whether the control is enabled |
Events
| Name | Type | Description |
|---|---|---|
change | value: floatto: float | The value was committed |
liveChange | value: floatto: float | Fired while dragging |