Hulian UIv0.93.5413 components0 components
  • Start
  • Components
  • Blocks
  • Pages
  • Demos
  • Changelog
ChineseEnglish
  • ComponentsComponents
  • ThemeTheme

Conversation

  • Conversation
  • ChatMessage
  • PromptInput
  • TypingDots

Reasoning and Tools

  • ThinkingBlock
  • ToolCall
  • AgentPlan
  • Dossier
  • Artifact
  • ConfirmCard
  • ThreadList
  • TaskRunner

Assistance

  • StreamingText
  • PromptSuggestions
  • MessageActions
  • Citation

ConfirmCard

confirm-card

Requests explicit user approval for an agent-proposed operation.

Usage

Basic usage

label/value List + Confirm/Modify double action. onConfirm/onEdit receives business callback.

Case Summary · Please confirm

Basic information
Lin Wanqing · 138-0000-0000
Job intention
Yunqi Technology · President's Personal Secretary
Educational background
Jiangnan University Administration
Work experience
Morningstar Group CEO Office Manager
tsx
<ConfirmCard
  title="Dossier summary · Please confirm"
  items={[
    { label: "Basic information", value: "Lin Wanqing · 138-0000-0000" },
    { label: "Job Intention", value: "Yunqi Technology·President's Personal Secretary" },
  ]}
  onConfirm={handleConfirm}
  onEdit={handleEdit}
/>

Confirmed (Locked)

acted="confirmed" Lock button and mark selected results.

Please confirm the following information

Basic information
Lin Wanqing · 138-0000-0000
Job intention
Yunqi Technology · President's Personal Secretary
Educational background
Jiangnan University Administration
Work experience
Morningstar Group CEO Office Manager
tsx
<ConfirmCard items={items} acted="confirmed" onConfirm={…} onEdit={…} />

Single action scene

If onEdit is not passed, the modification button will not be rendered to avoid unresponsive dead buttons.

Insufficient balance

Current balance
¥ 0.00
tsx
<ConfirmCard
  title="Insufficient balance"
  items={[{ label: "Current Balance", value: "¥ 0.00" }]}
  confirmText="Go to recharge"
  onConfirm={goRecharge}
/>

When to Use

Use it when a person must review structured fields and either confirm or request a correction before a high-risk agent action. Artifact presents output content and Dossier presents a case file; ConfirmCard combines label/value review, actions, and a locked post-action state.

Import

ts
import { ConfirmCard } from "@hulianui/ui"

Props

NameTypeDefaultDescription
items*ConfirmCardItem[]-Field summaries rendered as a description list; each item is { label, value }
acted"confirmed" | "edited" | nullnullControlled result that locks both actions and marks the selected outcome; renders "\u5df2\u786e\u8ba4" (Confirmed) or "\u4fee\u6539\u4e2d" (Editing)
classNamestring-Container additional classes

ConfirmCardItem

NameTypeDefaultDescription
label *ReactNode-Field name, rendered as <dt>.
value *ReactNode-Field value, rendered as <dd>.

Events

EventTypeDescription
onConfirm() => voidCalled when the user confirms the information
onEdit() => voidCalled when the user requests changes; omitting it also removes the edit button for single-action flows

Slots

SlotTypeDescription
titleReactNodeCard header title (default "\u8bf7\u786e\u8ba4\u4ee5\u4e0b\u4fe1\u606f" ("Please confirm the following information"))
confirmTextReactNodeConfirm-button content; defaults to "\u786e\u8ba4\u65e0\u8bef" ("Confirm as correct")
editTextReactNodeEdit-button content; defaults to "\u9700\u8981\u4fee\u6539" ("Needs changes")

ConfirmCardItem: { label: ReactNode; value: ReactNode }

Usage Guidelines

  • The edit button is omitted when onEdit is absent, avoiding an inert button in single-action flows. Provide both callbacks for two actions.
  • acted is controlled. Write the chosen result back from the parent after an action, or the card will not enter its locked, marked state.

Related

ThinkingBlock · ToolCall · AgentPlan · Dossier · Artifact · ThreadList

PreviousArtifactAI AgentsNextThreadList

On this page

  • Usage
  • Documentation
    • When to Use
    • Import
    • Props
    • Events
    • Slots
    • Usage Guidelines
    • Related