Text Area

Interface element that allows users to enter multi-line text. It is typically used for entering longer pieces of text, such as comments, descriptions, or messages, and is often characterized by its scrollable nature, which allows the text box to grow and accommodate more content as the user types.

TypeResource
DesignFigma
WebWeb Storybook
CodeGitlab
Helper text0/100

Usage

import { TextArea } from 'bio-bind-ui';
<TextArea
  defaultRows={2}
  errorText='Error text'
  helperText='Helper text'
  id='textarea'
  label='Label'
  maxLength={100}
  maxRows={4}
  mode='light'
  onChange={() => {}}
  placeholder='Placeholder'
  showCount
  style={{
    height: 'auto',
    width: 'auto',
  }}
  value=''
/>

Examples

Required Text Area

A required text area component in a user interface (UI) serves several important functions to enhance user experience and ensure proper form submission.

Helper text0/100

Mode (Optional)

Use mode to use dark or light.

Helper text0/100

Label Text Area (Optional)

Text area with show label only


Props

PropsRequiredDefaultTypedescription
valuefalse[]stringValue for the textarea.
onChangetrue-functionHandle changes in the input values of form elements.
modefalselightlight darkLight & dark mode.
labeltruelabelstringLabel for the textarea.
placeholdertrueplaceholderstringPlaceholder for the textarea.
idtruetextareastringID for text area.
defaultRowstrue2number[]Default rows for the textarea.
maxRowstrue4number[]Max rows for the textarea.
showCounttruetruebooleanShow count for the textarea.
maxLengthtrue100number[]Max length for the textarea.
disabledtruefalsebooleanDisabled state for the textarea.
requiredtruefalsebooleanRequired state for the textarea.
isErrortruefalsebooleanError state for the textarea.
errorTexttrueerror textstringError text for the textarea.
helperTexttruehelper textstringHelper text for the textarea.
stylefalse-CSSPropertiesCustom styles for the text area component.
nametruetextareastringName prop is commonly used in form elements, such as text areas.
BIND © Biofarma Innovate Next-level Design .