Debriefer
React

Textarea

Multi-line free-text Cell for open-ended answers. The agent can probe the response in place.

<Textarea> captures open-ended, multi-line text. It mirrors the HTML <textarea> you already know — but the agent can appraise the answer and ask a follow-up right inside the field, turning a single box into a short conversation.

Live preview

A running <Textarea> will render here once the component library is linked into the docs site. Until then, the code below is the source of truth.

Usage

import { Textarea } from '@debriefer/blocks-react';

<Textarea id="cancel_reason" label="What made you cancel?" />;

Author mode

Define the node inline by adding authoring props (Author posture):

<Textarea
  id="cancel_reason"
  label="What made you cancel?"
  description="A sentence or two is fine."
  objective="Surface the specific moment they decided to leave"
  probing={{ enabled: true }}
/>

Maps to

Node typequestion (or form · open_text)
StyleKit slotTextarea
Input shape<textarea>

Props

Inherits all shared Cell props. Affordance-specific:

PropTypeDefaultDescription
rowsnumber3Initial visible rows. Shape hint only.
placeholderstringPlaceholder text for the empty field.
autoFocusbooleanfalseFocus the field on mount.

Intelligence

When the respondent submits, the agent appraises the answer. If it probes, the follow-up prompt and the respondent's reply render in the field's Trail, and the next answer is captured in FollowUp — all without extra code. Style those surfaces via StyleKit, the same way you style the input itself.

Styling

const styleKit = {
  Textarea: ({ value, onChange, placeholder, rows, disabled, a11y }) => (
    <textarea
      value={value}
      onChange={onChange}
      placeholder={placeholder}
      rows={rows}
      disabled={disabled}
      {...a11y}
    />
  ),
};

See the StyleKit reference for the full slot-props contract.

On this page