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

vue-roue

v1.0.0

Published

[![npm version](https://img.shields.io/npm/v/vue-roue.svg?style=flat-square)](https://www.npmjs.com/package/vue-roue) [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE) [![Vue 3](https://img.shields.io/badge/vue-3.x-brightgree

Readme

🎡 Roue

npm version License: MIT Vue 3

A reusable and customizable Vue 3 component to spin a wheel of fortune — perfect for games, giveaways, raffles, or any luck-based mechanic.

✨ Built with ❤️, Vue 3, TypeScript & Tailwind CSS


Demo

Vue Roue Demo

🚀 Features

  • 🎯 Fully interactive — Spin the wheel with a button or programmatically
  • 🎛 Optional user controls — Let users edit segment values and colors directly in the UI
  • 🏆 Optional winner display — Automatically shows the selected segment after spinning
  • 🖱 Optional spin button — Display a built-in "SPIN!" button or trigger manually
  • 🎨 Custom or preset segments — Provide your own segments or use built-in presets like:
    • Fibonacci
    • T-shirt sizes (S, M, L, XL…)
    • Yes/No/Maybe
    • ...

📦 Installation

pnpm add vue-roue
# or
npm install vue-roue

🛠 Usage

<!-- App.vue -->
<script setup lang="ts">
import { ref } from "vue"
import "vue-roue/style.css"
import VueRoue from "vue-roue"

const segments = [
  { name: "🐱 Cat", color: "#f87171" },
  { name: "🐶 Dog", color: "#60a5fa" },
  { name: "🐔 Chicken", color: "#34d399" }
]

// Or use included preset
import { lunch } from "vue-roue"
const segments = lunch

const wheelRef = ref()

// To spin the wheel programmatically
const spin = () => wheelRef.value?.spin()

const handleWinner = (value: string) => {
  console.log("Winner is:", value)
}
</script>

<template>
  <Roue
    ref="wheelRef"
    :segments="segments"
    :wheel-size="450"
    with-spin-button
    with-winner-display
    with-controls
    @winner="handleWinner"
  />
</template>

⚙️ Props

| Prop | Type | Default | Description | | ------------------- | ----------- | ------- | ---------------------------------------- | | segments | Segment[] | — | Required. List of segments to spin. | | wheelSize | number | 600 | Size of the wheel in pixels. | | withSpinButton | boolean | false | Show a "SPIN" button under the wheel. | | withWinnerDisplay | boolean | false | Show the winner name below the wheel. | | withControls | boolean | false | Show segment editing UI below the wheel. |


🔁 Exposed Methods

Call spin() programmatically using ref:

const wheelRef = ref()
wheelRef.value?.spin()

📤 Events

| Event | Payload | Description | | -------- | -------- | ---------------------------- | | winner | string | Emitted when a segment wins. |


🧩 Types

type HexColor = `#${string}`

type Segment = {
  name: string
  color?: HexColor
}

🎨 Presets

| Name | Description | Values | | --------------- | ---------------------------- | ------------------------------------------------------------------------------------- | | fibonacci | Estimation using Fibonacci | 0, 1, 2, 3, 5, 8, 13, 20, , | | tshirts | T-shirt sizing scale | XS, S, M, L, XL | | yesNoMaybe | Simple decision options | Yes, No, Maybe | | dice | Simulates a 6-sided dice | 1, 2, 3, 4, 5, 6 | | nightActivity | Evening activity suggestions | 📺 TV show, 🎥 Movie, 🎮 Video game, ♟️ Board game, 📖 Book, 💤 Sleep | | lunch | Lunch ideas | 🍕 Pizza, 🥗 Salad, 🥫 Soup, 🍔 Burger, 🌯 Burrito, 🍣 Shushi, 🍝 Pasta |


👥 Contribution

Clone the repo and run locally:

pnpm install
pnpm dev

Build the package:

pnpm build

Feel free to open a PR if something's missing 🙏