Component

DurationScale

It records three press-and-hold durations, calculates their average, and keeps the content at the resulting scale until you measure it again.

01 / Preview

Try it yourself.

Preview Ready

02 / Usage

Put it somewhere.

example.tsxTSX
import { DurationScale } from "gra-ui";
import "gra-ui/styles.css";

export function MeasuredContent() {
  return <DurationScale>Hold this carefully</DurationScale>;
}

03 / API

Small surface area.

PropTypeDescription
childrenReactNodeThe content scaled by the average of three hold durations.