Skip to main content

Common Examples

To use the GuidanceCard, pass a referenceLabel and ordered changeSections. Wire onApply, onEdit, and onDismiss to handle Accept, Edit, and Reject.

States

state is "default", "accepted", "rejected", or "skipped". Non-default states collapse the body unless you set defaultExpanded. Accepted state can filter visible rows through appliedChangeIds.

Selection

Multiple single changes each get a checkbox. A single change has no checkbox; Accept applies to that item.

Change sections

Use type: "single" for scalar diffs and type: "table" for labeled line-item tables. Table cells may be a string, { type: "text", value }, { type: "diff", from, to }, or { type: "addition", value }.Pass referenceHref to make the reference label a link.

Actions

Accept and Edit receive the currently selected single-change and table-row ids. Reject calls onDismiss with no selection.

Internationalization

GuidanceCard owns these localized strings:
  • ai-kit.guidanceCard.suggestedChanges
  • ai-kit.guidanceCard.suggestionsAccepted
  • ai-kit.guidanceCard.suggestionsRejected
  • ai-kit.guidanceCard.suggestionsSkipped
  • ai-kit.guidanceCard.accept
  • ai-kit.guidanceCard.edit
  • ai-kit.guidanceCard.reject
  • ai-kit.guidanceCard.reasonPrefix
Localize referenceLabel, change labels, reasons, and table headers before passing them. Mount AiKitIntlProvider inside CartoTheme to switch the built-in strings.

React Accessibility

  • Title text reflects the current state.
  • Multiple changes expose selectable rows. A single change applies without a checkbox.
  • Table groups use the kit table selection semantics, including localized select-all and select-row labels.
Last modified on August 28, 2026