Skip to content
Latch

Component

StatusPill

A status is a short sentence, not a color.

Inline pills such as Added and Confirmed, and a toast that can be dismissed.

Added
Added

Do

  • Use a short past-tense word: Added, Confirmed.
  • Put the toast next to the action that caused it.
  • Let the person dismiss it.

Don't

  • Toast every internal step.
  • Rely on color alone.
  • Block the transcript with a banner.

Props

PropTypeDescription
childrenReactNodeThe status words.
toneneutral | success | danger | warningColor is secondary to the words.
messagestringToast only. The same words as the pill.
onDismiss() => voidToast only.

A2UI message

v0.9.1 envelope. catalogId is latch://catalog/v1. The preview under the message is rendered by the adapter, not hand-built.

JSON

[
  {
    "version": "v0.9.1",
    "createSurface": {
      "surfaceId": "status",
      "catalogId": "latch://catalog/v1"
    }
  },
  {
    "version": "v0.9.1",
    "updateComponents": {
      "surfaceId": "status",
      "components": [
        {
          "id": "root",
          "component": "Row",
          "children": [
            "added",
            "confirmed"
          ]
        },
        {
          "id": "added",
          "component": "StatusPill",
          "label": "Added",
          "tone": "neutral"
        },
        {
          "id": "confirmed",
          "component": "StatusPill",
          "label": "Confirmed",
          "tone": "success",
          "state": "confirmed"
        }
      ]
    }
  }
]
AddedConfirmed