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

Relationship Meter

ProNew

How 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

PropTypeDefault
level*1 | 2 | 3 | 4 | 5

How strong the relationship is, from 1 (cold) to 5 (very strong).

—
reasonstring

What 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.