Relationship Meter
ProNewHow strong a relationship is, as five rising bars with the level in words, the trend and the reason for it.
Installation
pnpm dlx shadcn@latest add @viewport/relationship-meter
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 |
|---|---|---|
| level* | 1 | 2 | 3 | 4 | 5How strong the relationship is, from 1 (cold) to 5 (very strong). | — |
| reason | stringWhat the level is based on, in a line, e.g. "Last reply 2 days ago". | — |
| trend | "up" | "down" | "steady"Which way it has moved lately. | — |
| size | "sm" | "md"`sm` shows the bars and the word on one line. | "md" |
Accessibility
- A meter whose value text is the level and the trend in words.
- The word carries the meaning; bars and color are a second cue.
- Server component with no client JavaScript.