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 🙏

© 2025 – Pkg Stats / Ryan Hefner

bracket-vue-tool

v1.0.24

Published

A flexible Vue 3 component for creating interactive tournament brackets (single & double elimination) with zero runtime dependencies.

Readme

🏆 Tournament Vue Tool

npm version License: MIT Downloads Storybook Docs Vue 3 Code Style CI

Tournament Vue Tool is a powerful and flexible Vue 3 component for building interactive tournament brackets. It supports both Single and Double Elimination formats, customizable match settings, responsive layout, dark mode, and state persistence — all with zero external dependencies.

🔗 Useful links

⚡ Features

  • Supported Tournament Formats
  • Customizable number of games per match
  • Team selection and score management
  • Responsive design
  • Dark mode support
  • State persistence
  • Permissions System

🧩 Supported Tournament Formats

bracket-vue-tool supports multiple bracket formats out of the box:

export const TOURNAMENT_FORMAT = {
  SINGLE_ELIMINATION: 'single_elimination',
  DOUBLE_ELIMINATION: 'double_elimination',
  SWISS: 'swiss',
  ROUND_ROBIN: 'round_robin',
};

🔐 Permissions System

You can control user actions in the bracket using a flexible permission system:

export const PERMISSIONS = {
    CAN_SELECT_TEAM: 'can_select_team',
    CAN_EDIT_DATE: 'can_edit_date',
    CAN_EDIT_SCOPE: 'can_edit_scope',
    CAN_EDIT_ROUND_NAME: 'can_edit_round_name',
    CAN_EDIT_BEST_OF: 'can_edit_best_of',
};

📦 Zero Dependencies

Tournament Vue Tool is built with modern Vue 3 and includes:

  • No runtime dependencies
  • 🎨 Fully styled with Tailwind CSS
  • Lightweight and framework-native

🚀 Installation

npm install bracket-vue-tool

Usage

Global Registration

import { createApp } from "vue";
import { install } from "bracket-vue-tool";
import "bracket-vue-tool/dist/style.css";

const app = createApp(App);
app.use({ install });

Component Registration

import { TournamentBracket } from "bracket-vue-tool";
import "bracket-vue-tool/style.css";

export default {
  components: {
    TournamentBracket,
  },
};

Basic Usage

<template>
  <TournamentBracket
    :size="8"
    :is-double-elimination="true"
    :default-best-of="3"
    @update:teams="handleTeamsUpdate"
    @update:scores="handleScoresUpdate"
  />
</template>

<script setup>
const handleTeamsUpdate = (teams) => {
  console.log("Teams updated:", teams);
};

const handleScoresUpdate = (scores) => {
  console.log("Scores updated:", scores);
};
</script>

Props

| Prop | Type | Default | Description | | ------------------- | ------- | ------- | -------------------------------------------------------- | | size | Number | 8 | Number of teams in the tournament (must be a power of 2) | | isDoubleElimination | Boolean | false | Whether to use Double Elimination format | | defaultBestOf | Number | 1 | Default number of games in a match (1, 3, 5, 7, or 9) |

Events

| Event | Payload | Description | | ------------- | ------- | ------------------------------- | | update:teams | Array | Emitted when teams are updated | | update:scores | Array | Emitted when scores are updated |

License

MIT


⚙ How It Works

The <TournamentBracket /> component accepts the following props:

  • initial-state — the initial tournament state (array of rounds and matches)
  • available-teams — array of available teams ({id, name})
  • default-best-of — Best of value (e.g., 3 means Best of 3)
  • @update:tournament-state — event emitted with updated state when changes happen

💻 Example Usage

<template>
  <div class="min-h-screen bg-[#27272b] text-white">
    <div class="p-4">
      <select v-model="selectedSize">
        <option v-for="size in availableSizes" :key="size" :value="size">
          {{ size }} Teams
        </option>
      </select>

      <select v-model="defaultBestOf">
        <option v-for="value in bestOfValues" :key="value" :value="value">
          Best of {{ value }}
        </option>
      </select>

      <TournamentBracket
        :initial-state="tournamentState"
        :available-teams="teams"
        :default-best-of="defaultBestOf"
        @update:tournament-state="updateTournamentState"
      />
    </div>
  </div>
</template>