- Implementation
- GuidanceCard Props
- GuidanceChange
Common Examples
To use theGuidanceCard, 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
Usetype: "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 }.Reference link
PassreferenceHref to make the reference label a link.Actions
Accept and Edit receive the currently selected single-change and table-row ids. Reject callsonDismiss with no selection.Internationalization
GuidanceCard owns these localized strings:ai-kit.guidanceCard.suggestedChangesai-kit.guidanceCard.suggestionsAcceptedai-kit.guidanceCard.suggestionsRejectedai-kit.guidanceCard.suggestionsSkippedai-kit.guidanceCard.acceptai-kit.guidanceCard.editai-kit.guidanceCard.rejectai-kit.guidanceCard.reasonPrefix
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.