Skip to content

Receipt

Stable

Collapse a card the person already answered into one line. It opens again to show the full card.

Also known as confirmation, order summary, summary

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

Closed

The default is one line. The check is decorative; the title says what happened.

When to use it

The pattern: every decision card in a thread becomes a Receipt after the person acts. The thread then reads as a short list of what happened, and the detail is still one press away.

Made of: Check icon · Title · Meta · Chevron · Opened card

Use it for

  • A question card, approval or form that the person has finished.
  • A step the agent finished that the person may want to check later.
  • Any card that matters while it is open and only for reference afterwards.

Not for

  • A section that opens and closes as part of the page: use Collapsible.
  • A card the person still has to act on: use ApprovalPrompt.
  • A history of events over time: use Timeline.

Do and avoid

Do. A settled step folds to one line, with the detail one press away.
Avoid. The send failed, but the folded line looks done, so nobody fixes it.

Do

  • Turn a decision card into a Receipt as soon as the person acts.
  • Name the receipt for what happened, not for the card.
  • Put the one fact people look for in meta, such as the amount.

Avoid

  • Do not use a Receipt for something the person still has to do.
  • Do not hide a failure inside a closed Receipt. Show it.
  • Do not nest Receipts.

On a phone

  • The header row is at least 44px tall on touch screens and spans the full width.
  • The title wraps, while the meta text on the right keeps its size and does not wrap.
  • It opens with a tap, and whatever you put inside needs to fit a phone width.

Build your next AI screen with Tattva.

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

Get started