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

Web Vitals

ProNew

Field metrics such as LCP, INP and CLS, each on a bar split at its own thresholds with a marker where the value falls, so the distance to the next band is visible.

Installation

pnpm dlx shadcn@latest add @viewport/web-vitals

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
vitals*Vital[]—

Accessibility

  • Each bar is a meter with the value and its band as text.
  • The band is a word and a shape as well as a color.
  • Metrics wrap to fit any width.
  • Server component with no client JavaScript.