npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@konbraphat51/affectiveslidervue

v1.0.0

Published

A Vue component implementation of the Affective Slider for measuring pleasure and arousal

Readme

Affective Slider Vue

A Vue 3 component implementation of the Affective Slider (AS) for measuring pleasure and arousal in emotion assessment.

Live Demo | npm Package

About

The Affective Slider (AS) is a digital scale for the self-assessment of emotion composed of two slider controls that measure:

  • Pleasure (sad - happy)
  • Arousal (sleepy - wide awake)

This component is based on the original Affective Slider by Alberto Betella and Paul F.M.J. Verschure.

The AS has been empirically validated and presented in the following open access scientific publication:

Alberto Betella and Paul F.M.J. Verschure, "The Affective Slider: A Digital Self-Assessment Scale for the Measurement of Human Emotions", PLoS ONE, vol. 11, p. e0148037, 2016. DOI: 10.1371/journal.pone.0148037

Installation

npm install @konbraphat51/affectiveslidervue

The CSS is automatically injected when you import the component, so no additional setup is needed!

Usage

You may like to see Demo implementation for live example.

Basic Usage

<template>
  <div>
    <AffectiveSlider
      @update:pleasureValue="handlePleasureChange"
      @update:arousalValue="handleArousalChange"
      @change="handleChange"
    />
  </div>
</template>

<script>
import AffectiveSlider from 'affectiveslidervue'

export default {
  components: {
    AffectiveSlider
  },
  methods: {
    handlePleasureChange(value) {
      console.log('Pleasure:', value)
    },
    handleArousalChange(value) {
      console.log('Arousal:', value)
    },
    handleChange(values) {
      console.log('Both values:', values)
    }
  }
}
</script>

With v-model

<template>
  <AffectiveSlider
    :pleasure-value="pleasure"
    :arousal-value="arousal"
    @update:pleasureValue="pleasure = $event"
    @update:arousalValue="arousal = $event"
  />
</template>

<script>
export default {
  data() {
    return {
      pleasure: 0.5,
      arousal: 0.5
    }
  }
}
</script>

With Labels

<template>
  <AffectiveSlider
    pleasure-left-label="Sad"
    pleasure-right-label="Happy"
    arousal-left-label="Sleepy"
    arousal-right-label="Awake"
  />
</template>

<script>
import AffectiveSlider from 'affectiveslidervue'

export default {
  components: {
    AffectiveSlider
  }
}
</script>

Props

| Prop | Type | Default | Description | |------|------|---------|-------------| | pleasureValue | Number | 0.5 | Initial value for pleasure slider (0-1) | | arousalValue | Number | 0.5 | Initial value for arousal slider (0-1) | | randomizeOrder | Boolean | true | Randomize the order of sliders to prevent bias | | imagePath | String | '/images/' | Base path for slider images | | pleasureLeftLabel | String | '' | Text label below left icon (sad face) of pleasure slider | | pleasureRightLabel | String | '' | Text label below right icon (happy face) of pleasure slider | | arousalLeftLabel | String | '' | Text label below left icon (sleepy face) of arousal slider | | arousalRightLabel | String | '' | Text label below right icon (awake face) of arousal slider |

Events

| Event | Payload | Description | |-------|---------|-------------| | update:pleasureValue | Number | Emitted when pleasure value changes | | update:arousalValue | Number | Emitted when arousal value changes | | change | { pleasure: Number, arousal: Number } | Emitted when any value changes | | interacted | { type: String, pleasure: Number, arousal: Number } | Emitted on first interaction with each slider |

License

CC-BY-SA-4.0 - Same as the original Affective Slider

Credits

Original Affective Slider by Alberto Betella and Paul F.M.J. Verschure

Vue component implementation: This project