Skip to content
ProLifetime access for $199, paid once, every future release included
Truffle UI

Ranking Badge

ProNew

A 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

PropTypeDefault
rank*1 | 2 | 3 | 4 | 5 | 6

The tier, from 1 (highest) to 6. The first three are struck in gold, silver and bronze.

—
unitstring

What a tier is called by the issuer, e.g. "Band" or "Tier".

"Band"
issuer*string

The directory or guide that publishes the ranking.

—
categorystring

The practice area and region ranked, e.g. "Corporate / M&A, New York".

—
yearnumber—
variant"plaque" | "mark"

`plaque` is the full badge; `mark` is the tier tile alone, for tables and dense rows.

"plaque"
sizekeyof typeof sizes"md"
classNamestring—

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.