How sure an answer is, right where it is said. A small mark follows the claim, and pointing at it tells you why, so people know what to trust and what to check.
When is the design review?
The design review is on Thursday at ten.
It will run for about an hour.
Maya will present the new onboarding.
Mark
Words beside it
Reason opens
NeedsReactFramer MotionTheme
Sourcenpm install framer-motion && curl --create-dirs -o src/components/confidence.tsx https://fragms.simonveprek.cz/source/confidence -o src/components/theme.tsx https://fragms.simonveprek.cz/source/themeSaves src/components/confidence.tsx and theme.tsx beside it after installing what it needs. No setup, works in any React project.
import { Confidence } from "@/components/confidence";<p> It will run for about an hour. <Confidence value={0.61} reason={["The invite says 45 minutes", "The last three ran over"]} /></p>
valueHow sure, from 0 to 1.
numberDefault requiredreasonWhy it is that sure. A line, or a few. Shown on hover and tap.
stringstring[]Default nonelookThree bars, a dot that pulses while unsure, a ring that fills, or the level in words.
barsdotringwordlabelShows the level's word beside the mark.
truefalselabelsThe words for each level.
{ low, medium, high }Default Unsure, Fairly sure, SurethresholdsWhere medium and high begin.
[number, number]Default [0.45, 0.75]colorsEach level's colour. High follows the theme's accent when there is one.
{ low, medium, high }Default red, amber, greenpercentShows the share as a number in the card.
truefalsetriggerOpens the card on hover and focus, or only on a click. A tap always works.
hoverclickWhat's new
- 2.0
- First release. How sure an answer is, with the reason on hover