Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Movement Leaderboard Stats Block for React

A league table with rank movement for eight clubs: an arrow, a word and a number (Up 4) and the two places as microcopy (7 to 3), with the biggest climber and the biggest faller beside it.

Framework
UI library

Preview

Preview width

Installation

Part of Pro
Pro unlocks the code and one-line install of every Pro button and text effect, plus the MCP for your AI editor.
Have Pro already? Sign in to open it.Opens here as soon as you're Pro.

Overview

A league table with movement for React with Base UI. A split gives the start column to the header ("Brindle Hill RC climbed 4 places") and a dl of two facts, the biggest climber and the biggest faller, each with the club, the move and the two places. The end column, across a divider, is a band of eight rows that runs to the rail and ends the block: a mono rank, the club, the distance this week and, at the end, how its place moved since last week. A move is an arrow, a word and a number ("Up 4"), then the two places as microcopy ("7 to 3"); a club that did not move says "Level" and "Stayed 4", and a club that was not in the table has a "New" badge and "Entered at 7". Movement never relies on colour. Ranks, moves and both facts are worked out from the typed distances and last week's places when the module loads. For a league, a ladder, a chart or a search ranking that moves week to week.

FAQ

How do I change the clubs and last week's places?

Edit CLUBS: a name, the distance this week (km) and last week's place (before, or null for a club that was not in the table). The module sorts by distance, ranks the rows, works out each move from the two places, and picks the biggest climber and faller. Change the unit by editing the km text in the row and the header line.

Why aren't climbs green and falls red?

A change is told by its glyph and its words, so it reads the same for everyone and in every theme: an up arrow and "Up 4", a down arrow and "Down 3", a dash and "Level". There is no colour to decode, and the theme's foreground stays the only text colour.

How are the biggest climber and faller chosen?

They are the entries with the largest gain and the largest loss, among clubs that were in last week's table. A new entry has a shift of zero and never counts. If two clubs tie, the one higher in the table wins. If nobody gained a place the "climber" shows the first club with a shift of zero ("Level"), so you may want to hide the fact in that case.

Is it accessible?

The table is an ordered list named for the week. Each move is words, not a picture: "Up 4, 7 to 3" is read out, and the arrows are decorative. The two facts are a description list with the label first. Movements sit in bdi elements so the whole phrase keeps its order on right-to-left pages, and the rows never rely on colour.

How does it fit on a phone?

The header and the two facts come first, then a hairline, then the rows. Each row keeps its rank, name, distance and move on one line; a long club name is truncated and the movement column keeps a fixed width so the rows line up. Nothing scrolls sideways at 320 pixels.

  • Pro

    A league table for a pub-quiz league in a split: the header and three season facts at the start, and all twelve teams in dense rows, two columns of six, at the end.

  • Pro

    A contributor leaderboard with the top three on a podium of stepped cells with initials avatars, in the order second, first, third, and places four to eight as rows in one hairline frame.

  • Pro

    A podcast chart in a reverse split: eight shows ranked by this week's listeners, each row with a line of its last eight weeks, the value and the change on last week as an arrow and a sign.

  • Pro

    Slope Chart Stats

    Area and line

    Six clubs on two vertical axes, after the first and the second quarter, with a solid 2 px line for a club that climbed and a dashed 1 px line for one that slipped, labelled at both ends with the change.

  • Pro

    Delta Pill KPI Tiles Stats

    KPI bands and tiles

    Four raised KPI tiles for a checkout analytics tool, each with its change as a pill: filled for a rise, outlined for a fall and muted for none, with an arrow or a dash and a sign.

  • Pro

    A six-row ranking in a hairline frame with a Week and Month switch that re-ranks the table: a large numeral and a quiet tint for the leader, and points that roll to their new numbers.