Matchup Matrix
Контрпики: матрица «чемпион против чемпиона» с тепловой шкалой и тултипами, выбор своего чемпиона, список на телефоне. Pro · Игры › Мета и тир-листы
Установка
npx valyro-cli@latest login
npx valyro-cli@latest add matchup-matrix
npm install valyro-ui-pro
import 'valyro-ui-pro/styles.css';
import { MatchupMatrix } from 'valyro-ui-pro';
Пропсы
| Prop | Type | Default | |
|---|---|---|---|
champions * | MatchupChampion[] | Champions, in the order of the rows. | |
matchups * | Matchup[] | Win rates of row champions against column champions; a missing pairing is read from its mirror. | |
opponents | string[] | Ids of the column champions. Default: every champion. | |
roles | GameRole[] | Roles of the champions: portrait fallbacks take their colour. | |
selected | string | Id of the reader's champion: its row is marked, the summary and the narrow-screen list are about it. | |
defaultSelected | string | Initial champion when uncontrolled. Default: the first. | |
onSelectedChange | (id: string) => void | Called when the reader picks a champion. | |
minGames | number | 50 | Fewer games than this: hatched and marked. Default 50. |
spread | number | 0.08 | Win-rate distance from 50% that gets the full colour. Default 0.08. |
showOverall | boolean | true | Adds the win rate against the field, weighted by share. Default true. |
onCellClick | (champion: MatchupChampion, opponent: MatchupChampion, cell: MatchupCell | undefined) => void | Called when a cell is clicked or Enter is pressed on it. | |
title | ReactNode | Heading. Default: labels.title. | |
subtitle | ReactNode | Line under the heading: patch, rank, sample. | |
headingLevel | 2 | 3 | 4 | 5 | 3 | Level of the heading (default 3). |
locale | string | BCP 47 locale for numbers; defaults to the ThemeProvider's. | |
labels | Partial<MatchupMatrixLabels> | Overrides for the built-in English text; keys left out keep their defaults. |
Похожие компоненты
- Tier List — Тир-лист S+…D: портреты с бейджем роли, фильтр ролей, перетаскивание мышью, тачем и с клавиатуры, экспорт
- Meta Table — Таблица меты: тир, винрейт, пикрейт и банрейт с изменением за патч, фильтры роли и ранга, виртуализация
- Tournament Bracket — Турнирная сетка: single и double elimination, счёт серий, победитель, путь команды, монограммы
- Patch Notes — Патчноут: чемпионы и предметы с иконками способностей, было → стало, бафф, нерф и изменение, фильтры
Назад: Meta Table · Далее: Tournament Bracket · Весь раздел «Игры»