Ranking Badge
ProNewA directory ranking as firms display it: a dark tile struck with the tier in gold, silver or bronze beside “Ranked in”, the directory, the practice area and the year. A tile-only mark fits tables.
Installation
pnpm dlx shadcn@latest add @viewport/ranking-badge
First time? Add the @viewport registry to components.json. Setup takes one minute.
Usage
The code behind the preview above comes with Truffle Pro.
Props
| Prop | Type | Default |
|---|---|---|
| rank* | 1 | 2 | 3 | 4 | 5 | 6The tier, from 1 (highest) to 6. The first three are struck in gold, silver and bronze. | — |
| unit | stringWhat a tier is called by the issuer, e.g. "Band" or "Tier". | "Band" |
| issuer* | stringThe directory or guide that publishes the ranking. | — |
| category | stringThe practice area and region ranked, e.g. "Corporate / M&A, New York". | — |
| year | number | — |
| variant | "plaque" | "mark"`plaque` is the full badge; `mark` is the tier tile alone, for tables and dense rows. | "plaque" |
| size | keyof typeof sizes | "md" |
| className | string | — |
Accessibility
- The tier is a numeral and a word as well as a metal.
- The mark alone is an image named with the full ranking.
- Long directory names truncate rather than wrap the badge.
- Server component with no client JavaScript.