Grapes homepage1.57.0
  • Guide
  • Tokens
  • Components
    Grapes on GithubGrapes on Figma
    Interaction
    • Button
    • IconButton
    • FloatingActionBar
    • Link
    Icons
    • Icon
    • HighlightIcon
    Form
    • AmountInput
    • Autocomplete
    • AutocompleteMultiple
    • AutocompletePlace
    • CheckboxBox
    • CheckboxField
    • DatePicker
    • FormField
    • Input
    • OptionGroup
    • PasswordInput
    • PhoneInput
    • RadioBox
    • RadioField
    • RadioGroup
    • Select
    • SwitchField
    • TextArea
    • TextInput
    • Upload
    • UploadButton
    Feedback
    • Badge
    • Banner
    • Callout
    • EmptyState
    • Modal
    • ModalSlideshow
    • DeprecatedModalSlideshow
    • PageModal
    • Skeleton
    • Tag
    • Toast
    • Tooltip
    Data display
    • Accordion
    • Avatar
    • Box
    • Calendar
    • CalendarRange
    • CollapsibleList
    • FileCard
    • InfoTip
    • ListBox
    • ListView
    • Panel
    • SidePanel
    • DeprecatedPreview
    • Table
    • Timeline
    • useDateFormatter
    Navigation
    • DropdownItem
    • DropdownMenu
    • Navigation
    • NavigationItem
    • Popover
    • Tabs

    TextArea

    The TextArea component lets users enter long form text which spans over multiple lines.

    View source code
    • Usage
    • Props
    • Accessibility
    • onChange
      ChangeEventHandler<HTMLTextAreaElement>

      Handler that is called when the value changes.

    • value
      string

      The current value (controlled).

    • className
      string

      className for the element

    • id
      string

      The id of the TextArea

    • isDisabled
      boolean

      Whether the TextArea is disabled.

      Default: false
    • isInvalid
      boolean

      Whether the TextArea is invalid.

      Default: false
    • isReadOnly
      boolean

      Whether the TextArea should be read only.

      Default: false
    • maxLength
      number

      The maximum number of characters supported by the TextArea.

    • name
      string

      The name of the TextArea, used when submitting an HTML form

    • onBlur
      FocusEventHandler<HTMLTextAreaElement>

      Handler that is called when the element loses focus.

    • onFocus
      FocusEventHandler<HTMLTextAreaElement>

      Handler that is called when the element receives focus.

    • onKeyDown
      KeyboardEventHandler<HTMLTextAreaElement>

      Handler that is called when a key is pressed.

    • placeholder
      string

      Temporary text that occupies the TextArea when it is empty.

    • ref
      Ref<HTMLTextAreaElement>

    • rows
      number

      The number of visible text lines for the control.

      Default: 3