Back to Copilotkit

Fields and Field

showcase/shell-docs/src/content/reference/channels/components/Fields.mdx

1.64.2869 B
Original Source

Fields groups Field values into a compact fact layout.

tsx
import { Field, Fields, Message } from "@copilotkit/channels/ui";

<Message>
  <Fields>
    <Field>Owner: Payments</Field>
    <Field>Status: Investigating</Field>
  </Fields>
</Message>;

Props

ComponentPropTypeDescription
FieldschildrenBotChildrenField children.
FieldlabelstringOptional provider label. Managed Slack renders it in bold.
FieldchildrenBotChildrenField value.

Managed Slack creates section fields and honors the label prop. Managed Teams creates an Adaptive Card FactSet by splitting each field's text at the first colon; it does not currently read the label prop. Use Label: value text, as in the example, when the same component must preserve labels in both providers.