Skip to content

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 ​

PropTypeDefaultDescription
minnumber0Lowest value.
maxnumber100Highest value.
stepnumber1Distance between allowed values.
labelstring""Visible label.
unitstring""Shown after the value, e.g. %.
disabledbooleanfalseDisables the slider.
namestring—Form field name.
modelValuenumber0Current value.

Other HTML attributes (id, class, aria-*, data-*…) fall through to the component’s element and are type-checked.

Events ​

EventPayloadDescription
update:modelValue[value: number]v-model update.