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/samvue

v1.1.1

Published

Self-Assessment Manikin (SAM) Vue component library

Readme

SAM.vue

Self-Assessment Manikin (SAM) Vue 3 component library.

npm version

Live Demo

Installation

npm install @konbraphat51/samvue
# or
pnpm add @konbraphat51/samvue
# or
yarn add @konbraphat51/samvue

Usage

<template>
  <SamSelector
    :axes="['arousal', 'valence', 'dominance']"
    displayFormat="nine"
    arousalLegendLeft="Low"
    arousalLegendRight="High"
    valenceLegendLeft="Unpleasant"
    valenceLegendRight="Pleasant"
    dominanceLegendLeft="Controlled"
    dominanceLegendRight="In Control"
    @select="handleSelect"
  />
</template>

<script setup>
import { SamSelector } from '@konbraphat51/samvue'

const handleSelect = (axis, value) => {
  console.log(`Selected ${axis}: ${value}`)
}
</script>

Note: CSS is automatically injected when you import the component. No need to import a separate CSS file!

Props

| Prop | Type | Default | Description | |------|------|---------|-------------| | axes | Array<'arousal' \| 'valence' \| 'dominance'> | ['arousal', 'valence', 'dominance'] | Which axes to display (can be 1, 2, or all 3) | | displayFormat | 'five' \| 'nine' | 'nine' | Display format: five shows only images 1,3,5,7,9; nine shows all 9 images | | arousalLegendLeft | string | '' | Left legend text for arousal axis (not displayed if empty) | | arousalLegendRight | string | '' | Right legend text for arousal axis (not displayed if empty) | | valenceLegendLeft | string | '' | Left legend text for valence axis (not displayed if empty) | | valenceLegendRight | string | '' | Right legend text for valence axis (not displayed if empty) | | dominanceLegendLeft | string | '' | Left legend text for dominance axis (not displayed if empty) | | dominanceLegendRight | string | '' | Right legend text for dominance axis (not displayed if empty) |

Events

| Event | Parameters | Description | |-------|------------|-------------| | select | (axis: SamAxis, value: number) | Emitted when a SAM image is selected | | update:arousal | (value: number \| null) | Emitted when arousal value changes | | update:valence | (value: number \| null) | Emitted when valence value changes | | update:dominance | (value: number \| null) | Emitted when dominance value changes |

Examples

Single axis

<SamSelector
  :axes="['valence']"
  displayFormat="five"
  valenceLegendLeft="😞"
  valenceLegendRight="😊"
/>

Two axes

<SamSelector
  :axes="['arousal', 'valence']"
  displayFormat="nine"
/>

All three axes with legends

<SamSelector
  :axes="['arousal', 'valence', 'dominance']"
  displayFormat="nine"
  arousalLegendLeft="Calm"
  arousalLegendRight="Excited"
  valenceLegendLeft="Unpleasant"
  valenceLegendRight="Pleasant"
  dominanceLegendLeft="Submissive"
  dominanceLegendRight="Dominant"
/>

Images

  • Arousal: 9 levels from calm to excited
  • Valence: 9 levels from unpleasant to pleasant
  • Dominance: 9 levels (scaled versions of valence-5 at 0.4×, 0.6×, 0.8×, 0.9×, 1.0×, 1.1×, 1.25×, 1.35×, 1.5×)

Borrowed from cwi-dis/self-assessment-manikins-svg under the BSD-2 Clause License.

License

Boost Software License 1.0

Be careful! The original SVG images are protected under the BSD-2 Clause License.