Skip to content

noob question #186

Answered by Drarig29
r-joey asked this question in Q&A
Discussion options

You must be logged in to vote

Hi! Yes you can use it client-side by importing the viewer. The manager is shipped inside it.

<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/brackets-viewer@latest/dist/brackets-viewer.min.js"></script>

After this, you can use the manager with window.bracketsManager.

To have best of 3 matches, you can do the following:

await window.bracketsManager.create({
  name: 'Example stage',
  tournamentId: 0,
  type: 'single_elimination',
  matchesChildCount: 3,
  seeding: [
    'Team 1',
    'Team 2',
    'Team 3',
    'Team 4',
    'Team 5',
    'Team 6',
    'Team 7',
    'Team 8',
  ],
});

Documentation: https://drarig29.github.io/brackets-docs/reference/model/interfaces/Stage…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by r-joey
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants