MSlider <m-slider>
A range slider. The thumb stretches into a teardrop and lags on a spring; drag fast and cumulus rolls up behind it, let go and a crescent flies on ahead. A native range input on top keeps pointer, keyboard and forms native.
Demo source
vue
<script setup lang="ts">
import { ref } from 'vue';
import { MSlider } from 'vue-manga-ui';
const volume = ref(30);
</script>
<template>
<MSlider v-model="volume" label="Volume" unit="%" name="volume" />
</template>Props
| Prop | Type | Default | Description |
|---|---|---|---|
min | number | 0 | Lowest value. |
max | number | 100 | Highest value. |
step | number | 1 | Distance between allowed values. |
label | string | "" | Visible label. |
unit | string | "" | Shown after the value, e.g. %. |
disabled | boolean | false | Disables the slider. |
name | string | — | Form field name. |
modelValue | number | 0 | Current value. |
Other HTML attributes (id, class, aria-*, data-*…) fall through to the component’s element and are type-checked.
Events
| Event | Payload | Description |
|---|---|---|
update:modelValue | [value: number] | v-model update. |