Form | SliderControl
SliderControl#
Description#
- Custom slider control with an icon, a calculated percentage and an optional side button.
Props#
icon(string) — Path to the icon shown.alt(string) — Alternative text for the icon. Default:''.tooltip(string) —titletext of the icon.modelValue(number) — Current slider value (v-model).min(number) — Minimum value. Default:0.max(number) — Maximum value. Default:100.showButton(boolean) — Shows a button with an icon on the left. Default:false.iconClass(string | Record<string, boolean>) — Classes for the icon.getPercentageClass((percentage: number) => string) — Optional callback returning CSS classes according to the percentage.
Emits#
update:modelValue— Emits the new numeric value when the slider is dragged.buttonClick— When the side button is clicked.
Usage#
| |
Notes#
getPercentageClasslets you change the colour of the percentage text according to the value.