Skip to content

QuestionSet

Stable

One card that asks every missing fact at once, one question at a time, with a single final button.

Also known as questionnaire, clarifying questions, ask user question, multi step form

Install with npm install @tattva/ui (setup), or copy the code from the kit in Downloads.

An agent's clarifying questions

Needs your answersNew project

Three quick questions

Question 1 of 3

What are you building?

Question 1 of 3: Kind

One question at a time with options, as agent tools ask them. The suggested option is marked Recommended and listed first. The trust question takes several answers. Every question offers You decide, the optional one offers Skip, and Use the defaults ends the questions. Number keys pick an option. Before the final button, a last look lists every answer with a Change link.

When to use it

Read once, ask once. The person answers everything the agent is missing in one place, and the agent gets one submit, not a string of follow-ups.

Made of: Reason badge and run name · Title · Already have list · Question tabs · Question and options · Something else input · Error message · Next or final button

Use it for

  • An agent that is missing two or more facts before it can act.
  • Short answers: a pick from a few options, a number, a date, or a few words.
  • Facts the agent already has, listed above the questions so the person does not repeat them.

Not for

Do and avoid

Needs your answersRefund request

Two quick questions

Question 1 of 2

Why are you asking for a refund?

Question 1 of 2: Reason

Do. All the missing facts are asked together, with one button.
Needs your answersRefund request

One quick question

Enter the one-time code sent to your phone.

Question 1 of 1: Code

Avoid. Asking for a one-time code here puts people's money at risk.

Do

  • Ask everything in one card, after the agent has read the request once.
  • Offer two or three likely options, and use input for the rest.
  • Put what you already know in known so the person never repeats it.
  • Replace the card with a Receipt once it is submitted.
  • Mark questions that can be skipped with required: false.

Avoid

  • Do not ask one question per message when you can ask them together.
  • Do not use it for a yes or no on a risky action. Use ApprovalPrompt.
  • Do not ask for passwords or codes here.
  • Do not pile on questions. If the list grows long, split the work.
  • Do not rely on the amber border alone to say a person must act. The badge says it in words.

On a phone

  • Only the current question shows its name in the step row on a phone, so every step fits; the others show a number or tick and keep their name for screen readers.
  • Options are one column on a phone and two columns from the sm breakpoint, and each option is at least 44px tall.
  • The date answer fills the width on a phone and is capped at 14rem from sm up.
  • After a tap on an option the set moves to the next open question and moves focus with it, so the on-screen keyboard only appears for questions that take typing.

Build your next AI screen with Tattva.

Free and open, with the code. Start in one line.

Get started