Score Medallion
ProNewA coin with a fluted metallic rim and a score on its face, in platinum, gold, silver, bronze and emerging tiers.
Installation
pnpm dlx shadcn@latest add @viewport/score-medallion
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 |
|---|---|---|
| score* | numberThe number struck on the face, e.g. a score out of 100. | — |
| tier* | keyof typeof tiersThe metal of the rim. | — |
| label | stringWhat the score measures, for screen readers, e.g. "Reputation score". | "Score" |
| size | keyof typeof sizes | "sm" |
| showLabel | booleanShow the tier's name beside the medallion. | false |
| className | string | — |
Accessibility
- An image named with what the score measures, the score and the tier.
- The tier can be written beside it, so metal is not the only signal.
- Server component with no client JavaScript.