Skip to content

Slider ​

Adjusts a value with continuous feedback, by touch or keyboard.

Basic usage ​

Live preview
Interface opacity72
Fixed brightness50
View Vue source
Vue · TypeScript
<script setup lang="ts">
import { AgmSlider } from 'augma'
import { shallowRef } from 'vue'

const opacity = shallowRef(72)
</script>

<template>
  <div class="example-stack">
    <AgmSlider v-model="opacity" label="Interface opacity" :min="20" :max="100" />
    <AgmSlider label="Fixed brightness" :model-value="50" disabled />
  </div>
</template>

<style scoped>
.example-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}
.example-stack {
  display: grid;
  gap: 24px;
  width: 100%;
  max-width: 360px;
}
</style>

API ​

PropTypeDefaultDescription
modelValuenumber0Updated through v-model
labelstringRequiredVisible label
minnumber0Minimum
maxnumber100Maximum; must be greater than min
stepnumber1Positive step size
disabledbooleanfalseBlocks adjusting
namestringundefinedForm field name

Events ​

  • update:modelValue(number)

Keyboard and usage notes ​

Arrow keys move by one step, Home / End jump to the limits, Page Up / Down take larger steps.

Installation ​

ts
import { AgmSlider } from 'augma'
import 'augma/style.css'