skip to the page
superthread
componentsinline answers
system
superthread
version
2.15.1
date
24.11.26

inline answers

a suggestion that takes correction where it stands. one word swaps the line for plain answers, and nothing else on the page moves.

bunx --bun shadcn@latest add @mk/inline-answers

example

press wrong?. the answers take the line’s place, and wrong? stays as the lead-in that closes them. choosing an answer closes them too, and focus goes back to wrong?, as it does on escape.

light

the next draft waits on your answer, and it leads today’s brief.

the words under the slot stay put.

dark

the next draft waits on your answer, and it leads today’s brief.

the words under the slot stay put.

open

an answer that needs one more word asks for it there: wrong day stays as its lead-in, and its own answers follow the arrow. the second click of a double click counts for nothing, because the answers can land under the pointer.

light

dark

on a phone

each answer is a 44 px box, and a second row sits a whole target below the first, so no two hit areas overlap. the row keeps to the line’s first row, and the job’s actions stay where they were.

light

dark

parts

InlineAnswers
holds the open state. its slot belongs to the parent, which holds the height. key it to the suggestion, so a new one starts closed. open, defaultOpen and onOpenChange are there for a ship that drives it.
InlineAnswersLine
the line the answers replace.
InlineAnswersTrigger
the word that opens and closes them, wrong? until you pass another.
InlineAnswersList
the answers, as a group named by the trigger.
InlineAnswer
one plain answer, a button. choosing it closes the answers unless onClick prevents default.
InlineAnswersAsk
an answer that asks one more question. question is its word, and its children are the question’s own InlineAnswers.