KQ-834 · UNCERTAINTY/HEDGE
Uncertainty Hedge
An answer that marks the phrases it is guessing at. Each guessed phrase carries a soft one-pixel warn underline drawn as a bottom-anchored background, so a wrapped phrase keeps its line on every fragment; the lines draw left to right on glide in a cascade, and hovering or focusing a phrase thickens its line to three pixels on snap. A legend rolls the count on snap, and pressing a phrase glides a note beneath the paragraph to its measured height with the model's reason; Enter or Space opens or swaps it and Escape folds it.
The Basinworks van should be back on the road by ThursdayGuessed phrase 1 of 3, assuming the part is the alternatorGuessed phrase 2 of 3. Cover for the Tuesday run is probably the pool carGuessed phrase 3 of 3.
Why it guessed3 guessed phrases3 guesses · hover or press one
Install
One command — the source lands in your repo. Or copy it from the Code tab.
$ pnpm dlx shadcn@latest add @kinetiq/uncertainty-hedge
Props
- segments
- HedgeSegment[]
- default —
- The answer in order: plain strings and { id, phrase, why } guessed phrases.
- open / defaultOpen
- string | null
- default null
- Controlled or initial id of the phrase whose reason is showing, or null.
- onOpenChange
- (id: string | null) => void
- default —
- Fires from the press or Escape that opened, swapped or folded a reason.
- onHoverChange
- (id: string | null) => void
- default —
- Fires when the phrase under the pointer or focus changes.
- legend
- boolean
- default true
- Whether the count legend shows above the paragraph.
- label
- string
- default —
- Names the answer region and prints as the legend caption.
| Prop | Type | Default | Description |
|---|---|---|---|
| segments | HedgeSegment[] | — | The answer in order: plain strings and { id, phrase, why } guessed phrases. |
| open / defaultOpen | string | null | null | Controlled or initial id of the phrase whose reason is showing, or null. |
| onOpenChange | (id: string | null) => void | — | Fires from the press or Escape that opened, swapped or folded a reason. |
| onHoverChange | (id: string | null) => void | — | Fires when the phrase under the pointer or focus changes. |
| legend | boolean | true | Whether the count legend shows above the paragraph. |
| label | string | — | Names the answer region and prints as the legend caption. |