Component
DecimalErosion
Erode one place rounds the live number from four decimal places down to an integer. The precision scale and native progress bar advance with every real change, while Restore precision returns the supplied value.
Possible use
It could let a reviewer simplify a handoff estimate one decimal place per objection, or let a presenter make an agenda score slowly surrender its precision before a decision. Both uses confuse rounding with an achievement.
Reasonable alternative
A reasonable local alternative is formatting the number once at the precision the task requires. A progress bar should not make a harmless rounding policy feel like a campaign.
01 / Preview
Try it yourself.
Current precision27.6384
Mechanism
- 1
- Start with four decimal places.
- 2
- Erode one place; the actual number rounds.
- 3
- Repeat until a whole number is declared progress.
02 / Usage
Put it somewhere.
example.tsxTSX
import { DecimalErosion } from "gra-ui";
import "gra-ui/styles.css";
export function ErodingEstimate() {
return <DecimalErosion value={27.6384} />;
}03 / API
Small surface area.
PropTypeDescription
valuenumberThe finite number whose decimal precision is eroded one place at a time.