Component

Vue Range Slider Component

<DomRangeInput>

A compact slider input for numeric values with a stylable track and handle.

Playground

Try every prop live

Range input playground

Adjust the props to explore sizing, content, and behaviour.

64%
Playground.vuevue
Install
npm install @getdom/studio
vue
<script setup>
import '@getdom/studio/style.css';
import { reactive } from 'vue';
import { DomRangeInput } from '@getdom/studio';

const data = reactive({
		"modelValue": 64,
		"id": "",
		"name": "",
		"label": "Confidence",
		"description": "",
		"placeholder": "",
		"required": false,
		"disabled": false,
		"readOnly": false,
		"invalid": false,
		"errors": [],
		"visible": true,
		"validators": [],
		"validateOnBlur": true,
		"chrome": "field",
		"min": 0,
		"max": 100,
		"step": 1,
		"suffix": "%",
		"showValue": true,
		"trackClass": "",
		"controlClass": "",
		"progressClass": "",
		"handleClass": "size-5 border-2 border-canvas shadow-md group-hover:scale-110",
		"activeHandleClass": "scale-125 ring-4 ring-primary/20"
	});
</script>

<template>
	<DomRangeInput
		v-bind="data"
		@update:modelValue="data.modelValue = $event"
	/>
</template>

Reference

Props

Control props

NameTypeTSDefaultDescription
modelValuenumber | stringstring0Current numeric value.
minnumbernumber0Minimum slider value.
maxnumbernumber100Maximum slider value.
stepnumbernumber1Slider increment.
suffixstringstring''Optional unit shown beside the value.
showValuebooleanbooleantrueShow the current value beside the slider.
trackClassstring | array | objectArray<unknown>''Classes applied to the visual range track.
controlClassstring | array | objectArray<unknown>''Classes applied to the interactive track area, including its touch target height.
progressClassstring | array | objectArray<unknown>''Classes applied to the filled range track.
handleClassstring | array | objectArray<unknown>''Classes applied to the visual slider handle.
activeHandleClassstring | array | objectArray<unknown>''Additional classes applied to the handle while it is being dragged.

Field props

NameTypeTSDefaultDescription
idstringstring''Optional ID override. By default parent forms derive the input ID from the field path using underscores.
namestringstring''Local field name. Parent forms derive the full field path and native HTML name from the form hierarchy.
labelstringstring''Visible field label.
descriptionstringstring''Optional helper copy below the field.
placeholderstringstring''Placeholder shown when the control is empty.
requiredbooleanbooleanfalseMark the field as required.
disabledbooleanbooleanfalseDisable field interaction.
readOnlybooleanbooleanfalseShow the value but prevent editing.
invalidbooleanbooleanfalseMark the field invalid.
errors
ts
[
	{
		name: "Validation name",
		message: "Error message",
	}
]
array | object | stringArray<ErrorsItem
type ErrorsItem = {
	name?: string; // Name
	message?: string; // Message
};
>
[]Validation errors for this field.
visiblebooleanbooleantrueShow or hide the field.
validatorsarrayArray<unknown>[]Validators attached to this field. Use functions in Vue code, or serializable records such as { name: "minLength", props: { min: 2 } } in generated schemas.
validateOnBlurbooleanbooleantrueRun validators when the field loses focus.
chrome'field' | 'none' | falsestring'field'Render default field chrome, or hide chrome while keeping form state wiring.

Auto-generated from Range input.props and inline _edit hints.

Events

NamePayloadDescription
@update:modelValuenumberThe value changed through pointer or keyboard input.
@update:draggingbooleanPointer scrubbing started or finished, including cancellation.
@focus——
@blur——

Names auto-detected from defineEmits and source emit() calls; payload and description from __doc.events when present.