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

dialogue-wheel-component

v1.0.1

Published

A configurable 3D-style dialogue wheel web component.

Readme

Dialogue Wheel Component

A configurable 3D-style dialogue wheel web component.

Installation

npm install dialogue-wheel-component 
# or your chosen package name

Usage

<!-- Include the script in your HTML -->
<script type="module" src="node_modules/dialogue-wheel-component/dialogue-wheel.js"></script>

<!-- Use the component -->
<dialogue-wheel id="myWheel"></dialogue-wheel>

<script>
  const wheel = document.getElementById('myWheel');
  
  // Set options via property
  wheel.options = [
    { text: "Attack", color: "#e74c3c" },
    { text: "Defend", color: "#3498db" },
    { text: "Magic", color: "#9b59b6", disabled: true }, // Example disabled option
    { text: "Items", color: "#2ecc71" },
    { text: "Flee", color: "#f1c40f" },
    { text: "Talk", color: "#e67e22" }
  ];

  // Set appearance properties
  wheel.wheelRadius = 90;
  wheel.ringThickness = 40;
  wheel.perspectiveAngleX = 45;
  wheel.fontSizeScale = 1.5;
  wheel.bevelIntensity = 0.5;
  wheel.ringExtrusion = 35;
  wheel.disabledOpacity = 0.5;
  wheel.disabledSaturation = 0.25;
  wheel.disableAffectsText = false;

  // Listen for selection events
  wheel.addEventListener('option-selected', (event) => {
    console.log('Selected:', event.detail.option);
    // Example: Update some UI element
    // const selectionDisplay = document.getElementById('selectionInfo');
    // if (selectionDisplay) {
    //     selectionDisplay.textContent = `Selected: ${event.detail.option.text}`;
    // }
  });
</script>

Attributes / Properties

Properties can be set directly on the element instance (e.g., wheel.wheelRadius = 100;). Corresponding kebab-case attributes can be set in HTML (e.g., <dialogue-wheel wheel-radius="100">).

  • options: (Array) Array of option objects { text: string, color?: string, disabled?: boolean }. Must be set via property.
  • wheel-radius / wheelRadius: (Number) Outer radius of the wheel ring in pixels. Default: 150.
  • ring-thickness / ringThickness: (Number) Thickness of the wheel ring in pixels. Default: 60.
  • perspective-angle-x / perspectiveAngleX: (Number) Angle in degrees for the 3D perspective tilt along the X-axis. Default: 0.
  • font-size-scale / fontSizeScale: (Number) Multiplier for the base font size (14px) of the labels. Default: 1.
  • bevel-intensity / bevelIntensity: (Number, 0-1) Intensity of the bevel/lighting effect on the segments. Default: 0.
  • ring-extrusion / ringExtrusion: (Number) Apparent depth of the ring extrusion effect in pixels (controls number/offset of layers). Default: 0. Clamped 0-50.
  • disabled-opacity / disabledOpacity: (Number, 0-1) Opacity applied to disabled items. Default: 0.5.
  • disabled-saturation / disabledSaturation: (Number, 0-1) Saturation filter (saturate()) applied to disabled items. Default: 0.3.
  • disable-affects-text / disableAffectsText: (Boolean) If true, disabled styles (opacity/saturation) also apply to text labels and connector lines. Default: true.

Events

  • option-selected: Fired when an enabled option segment is clicked. The event detail object contains:
    • index: (Number) The index of the selected option in the options array.
    • option: (Object) The full option object that was selected.