Package Exports
- bracky
- bracky/dist/bracky.common.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (bracky) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Bracky
Single elimination brackets component for vuejs
- this repo is not fully functional yet
Usage/Examples
<Bracket v-model="rounds">
<template #game="{ game }">
{{game}}
</template>
</Bracket><script>
import Bracket from "bracky";
const rounds = [
//Semi finals
{
games: [
{
player1: { id: "1", name: "Competitor 1", winner: false, score: 2 },
player2: { id: "4", name: "Competitor 4", winner: true, score: 2 },
},
{
player1: { id: "5", name: "Competitor 5", winner: false, score: 2 },
player2: { id: "8", name: "Competitor 8", winner: true, score: 2 },
},
],
},
//Third place play off
{
games: [
{
player1: { id: "1", name: "Competitor 1", winner: false, score: 2 },
player2: { id: "5", name: "Competitor 5", winner: true, score: 2 },
},
],
},
//Final
{
games: [
{
player1: { id: "4", name: "Competitor 4", winner: false, score: 2 },
player2: { id: "8", name: "Competitor 8", winner: true, score: 2 },
},
],
},
];
export default {
components: {
Bracket,
},
data() {
return {
rounds: rounds,
};
},
};
</script>Credits
Based on “Responsive Tournament Bracket” by Jakub Hájek