MazSlider
MazSlider is a standalone component that replaces the standard html input range with a beautiful design system. Many options like multiple cursors and values, colors, sizes and logarithmic/exponential values are available
INFO
Before you have to import the global css files in your project, follow instructions in Getting Started
Basic usage
vue
<template>
<MazSlider v-model="sliderValue" />
</template>
<script lang="ts" setup>
import MazSlider from 'maz-ui/components/MazSlider'
import { ref } from 'vue'
const sliderValue = ref(50)
</script>
Options
Multiple sliders & labels
vue
<template>
<MazSlider v-model="multipleSilders" :labels="multipleSildersLabels" />
</template>
<script lang="ts" setup>
import MazSlider from 'maz-ui/components/MazSlider'
import { ref } from 'vue'
const multipleSilders = ref([25, 50, 75])
const multipleSildersLabels = ['Small', 'Middle', 'Big']
</script>
Sizes & colors
vue
<template>
<MazSlider
v-model="multipleSilders"
:labels="multipleSildersLabels"
color="secondary"
size="1.5rem"
/>
<MazSlider
v-model="multipleSilders"
:labels="multipleSildersLabels"
color="danger"
size="1.2rem"
/>
<MazSlider
v-model="multipleSilders"
:labels="multipleSildersLabels"
color="success"
size="12px"
/>
<MazSlider
v-model="multipleSilders"
:labels="multipleSildersLabels"
color="info"
size="10px"
/>
</template>
<script lang="ts" setup>
import MazSlider from 'maz-ui/components/MazSlider'
import { ref } from 'vue'
const multipleSilders = ref([25, 50, 75])
const multipleSildersLabels = ['Small', 'Middle', 'Big']
</script>
Logarithmic/exponential
vue
<template>
<MazSlider
v-model="logSilders"
:labels="logSildersLabels"
:min="50"
:max="50000"
logs
/>
</template>
<script lang="ts" setup>
import MazSlider from 'maz-ui/components/MazSlider'
import { ref } from 'vue'
const logSilders = ref([50, 10000, 30000, 45000])
const logSildersLabels: ['Micro', 'Small', 'Middle', 'Big']
</script>
no-divider & no-zoom-animation
Each sections between cursors has the same color
Component don't have animation on cursor
vue
<template>
<MazSlider
v-model="multipleSilders"
no-divider
no-cursor-anim
/>
</template>
<script lang="ts" setup>
import MazSlider from 'maz-ui/components/MazSlider'
import { ref } from 'vue'
const multipleSilders = ref([25, 50, 75])
</script>
Props & Event
Props
Prop name | Description | Type | Values | Default |
---|---|---|---|---|
modelValue | Array of cursors values | number | number[] | - | |
labels | array of cursors label | array | - | undefined |
min | min value of sliders | number | - | 0 |
max | max value of sliders | number | - | 100 |
size | height size of slider bar | string | - | undefined |
noDivider | remove div in different colors | boolean | - | false |
log | become a logarithmic slider (exponential) | boolean | - | false |
color | main slider color | Color | - | 'primary' |
noCursorAnim | disables cursor animation when active | boolean | - | false |
Events
Event name | Properties | Description |
---|---|---|
update:model-value |