Confidence Glass
A classifier's answer on a glass pill over its photo. Sure answers sit on clear, still glass; unsure ones on cloudy frost that never quite settles.
Needs: A label and a 0 to 1 score from your own classifier. No model in the browser.
Customize
photo
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| src | string | required | The image the answer is about. Fills the frame (4:3 by default; set aspect-ratio in style to change it). |
| label | string | required | The model's answer. |
| confidence | number | required | 0 to 1. Sure answers sit on solid, still glass; unsure ones on thin frost whose edge never settles. |
| alt | string | "" | Describes the image for screen readers; the label and score are read after it. |
| inset | number | 20 | Gap between the pill and the bottom of the image, px. |
| className | string | – | Class on the frame. |
| style | CSSProperties | – | Style on the frame, e.g. width, aspect-ratio or --mlui-radius. |