logofirst
logofirst GitHub

TextArea

Use the TextArea tag to display a text area for user input. Use for transcription, paraphrasing, or captioning tasks.

Use with the following data types: audio, image, HTML, paragraphs, text, time series, video

Parameters

Param Type Default Description
name string Name of the element
toName string Name of the element that you want to label
value string Pre-filled value
[label] string Label text
[placeholder] string Placeholder text
[maxSubmissions] string Maximum number of submissions
[editable] boolean false Whether to display an editable textarea
[transcription] boolean false If false, always show editor
[rows] number Number of rows in the textarea
[required] boolean false Validate whether content in textarea is required
[requiredMessage] string Message to show if validation fails
[showSubmitButton] boolean Whether to show or hide the submit button. By default it shows when there are more than one rows of text, such as in textarea mode.
[perRegion] boolean Use this tag to label regions instead of whole objects

Example

<!--Basic labeling configuration to display only a text area -->
<View>
  <TextArea name="ta"></TextArea>
</View>

Example

<!--You can combine the TextArea tag with other tags for OCR or other transcription tasks-->
<View>
  <Image name="image" value="$ocr"/>
  <Labels name="label" toName="image">
    <Label value="Product" background="#166a45"/>
    <Label value="Price" background="#2a1fc7"/>
  </Labels>
  <Rectangle name="bbox" toName="image" strokeWidth="3"/>
  <TextArea name="transcription" toName="image" editable="true" perRegion="true" required="true" maxSubmissions="1" rows="5" placeholder="Recognized Text" displayMode="region-list"/>
</View>