AI Components / Action Preview
Action Preview
Confirmation card before executing AI action with severity badge and countdown.
ai-essentials v0.5.0
Playground
Examples
High severity
<ai-action-preview title="Send 500 Invoices" description="This will email invoices to all outstanding accounts." severity="high" style="max-width:400px;"></ai-action-preview> Import
import { AiActionPreview } from '@cognivo/components'; // Or tree-shake: import '@cognivo/components/ai-action-preview'; Per-component imports ship only that component (~8 kB gzip).
API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
title | string | — | Action title |
description | string | — | Action description |
severity | "low"|"medium"|"high"|"critical" | — | Severity level |
countdown | number | — | Auto-confirm seconds |
Events
| Event | Detail | Description |
|---|---|---|
ai-action-confirm | {action} | Confirmed |
ai-action-cancel | {} | Cancelled |