Skip to content

ErrorState

Stable

A red message for a problem that can be fixed, with an optional Try again button.

Also known as error page, error message, failure state, retry

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

With retry

Say whether the person's work is safe and offer a next step.

When to use it

Says that something failed, that it can be fixed, and offers to try again. It is a red Callout with that wording ready to use.

Made of: Alert icon · Title · Message · Try again button

Use it for

  • A request that failed and is safe to try again.
  • A part of the page that could not load.

Not for

Do and avoid

Do. Says what went wrong in plain words and offers a retry.
Avoid. A raw error code means nothing to the person reading it.

Do

  • Say what happened in plain words, and whether the person's work was kept.
  • Add Try again only when it can work.
  • Use a specific title when you know the cause.

Avoid

  • Do not use it for refusals or usage limits. Use RefusalNotice or RateLimitNotice.
  • Do not show error codes or technical details as the message.
  • Do not blame the person. Describe what went wrong on our side.

On a phone

  • The message wraps, and on a phone the Try again button drops under it so the text keeps its full width.
  • Try again keeps its size and has a 44px tap area on touch screens.
  • It fills the width of its container.

Build your next AI screen with Tattva.

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

Get started