ValyroUI Русская версия

Leaderboard

Leaderboard: medal places, thumbnails, numbers and change over a period. Pro · Data and metrics › Metrics and widgets

Installation

npx valyro-cli@latest login
npx valyro-cli@latest add leaderboard
npm install valyro-ui-pro

import 'valyro-ui-pro/styles.css';
import { Leaderboard } from 'valyro-ui-pro';

Props

PropTypeDefault
items *LeaderboardItem[]Ranked entries, first place first.
titleReactNodeHeading of the board.
iconReactNodeIcon before the heading.
periods{ value: string; label: string }[][]Period choices shown as a switcher in the header.
periodstringChosen period (controlled).
defaultPeriodstringInitial period when uncontrolled.
onPeriodChange(period: string) => voidCalled with the new period when it changes.
medalsbooleantrueGold, silver and bronze dots on the top three. Default true.
footerReactNodeNote under the list: "Updated hourly".
headingLevel1 | 2 | 3 | 4 | 5 | 63Level of the heading (default 3).
localestringBCP 47 locale for the rank and rating numbers.
labelsPartial<LeaderboardLabels>Overrides for the built-in English text; keys left out keep their defaults.

Related components

  • Stats Card — Metric cards
  • KPI Group — KPI row: value, change vs. previous period, sparkline and progress to goal
  • Widget — Dashboard container: title, actions, big number, legend and chart area
  • Number Value — Locale-aware number: currency, percent, compact notation and units
  • Trend Value — Metric change: arrow, sign and color, as text or a pill
  • Proportion Bar — Proportion bar with a legend: storage, budget, breakdown
  • Activity Rings — Concentric progress rings toward goals
  • Data Table — Tables with search and sorting
  • Data Grid — Grid for 100,000 rows: grouping, filters, inline editing
  • Virtual List — Virtual list for 100,000 rows
  • Bulk Action Bar — Actions for selected rows, with keyboard shortcuts
  • List Block — List with images or icons, descriptions and values

Previous: Activity Rings · Next: Line Chart · All Data and metrics