xns-seek-bar
XnsSeekBar
A seekable progress bar component for Vue 3 with TypeScript support.

Installation
npm install xns-seek-bar
Usage
As a Plugin (Global Registration)
import { createApp } from 'vue'
import XnsSeekBarPlugin from 'xns-seek-bar'
const app = createApp(App)
app.use(XnsSeekBarPlugin)
app.mount('#app')
As a Component (Local Registration)
<template>
<XnsSeekBar
:current-value="currentValue"
:total-value="100"
@seeked-to="onSeek"
/>
</template>
<script setup lang="ts">
import { ref } from 'vue'
import { XnsSeekBar } from 'xns-seek-bar'
const currentValue = ref(50)
const onSeek = (value: number) => {
currentValue.value = value
}
</script>
In Browser
<script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
<script src="https://cdn.jsdelivr.net/npm/xns-seek-bar/dist/index.umd.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/xns-seek-bar/dist/style.css">
Example
<xns-seek-bar :bar-color="'#ffdd00'" :current-value="33" :total-value="100" @seeked-to="handleSeek"></xns-seek-bar>
Options
| Option | Type | Required | Default |
|---|---|---|---|
| currentValue | Number | false | 0 |
| totalValue | Number | false | 300 |
| listen | Boolean | false | true |
| barHeight | Number | false | 0.5 |
| barColor | String (Hex) | false | false |
| barShadeColor | String (Hex) | false | false |
| intensity | Number (0.1 - 1) | false | 0 |
Options Details
listen : Enable touch / tap.
Events
seekedTo Returns a Number representing value of seeked position.
Related Packages
vue-concise-slider
vue-slider,A simple sliding component,has easy configuration,support self-adapti...
125,004
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 2.0.0 | ^3.0.0 | ISC | |
| 1.0.1 | ^2.6.11 | ISC | |
| 1.0.0 | ^2.6.11 | ISC |