Search documentation

Search documentation

Type@pillar-ai/react

CardComponentProps

Props passed to custom card components.

typescript
import type { CardComponentProps } from '@pillar-ai/react'

Definition

typescript
interface CardComponentProps<T = Record<string, unknown>> {
/** Data extracted by the AI for this action */
data: T;
/** Called when user confirms the action */
onConfirm: (modifiedData?: Record<string, unknown>) => void;
/** Called when user cancels the action */
onCancel: () => void;
/** Called to report state changes (loading, success, error) */
onStateChange?: (
state: "loading" | "success" | "error",
message?: string
) => void;
}

Properties

Properties

data
requiredT
Data extracted by the AI for this action
onConfirm
required(modifiedData?: Record<string, unknown>) => void
Called when user confirms the action
onCancel
required() => void
Called when user cancels the action
onStateChange
( state: "loading" | "success" | "error", message?: string ) => void
Called to report state changes (loading, success, error)
Source: packages/sdk-react/src/PillarProvider.tsx