Garden 9 is now available.
The website has been updated to the latest major version. View previous versions
Skip to main content
Design
Components
Patterns
    • Introduction
      • Overview
    • Foundations
      • Bedrock CSS
      • Design tokens
      • Containers
      • Theming
      • Versions
    • Components
      • Accordion
      • Anchor
      • Avatar
      • Breadcrumbs
      • Buttons
      • Chrome
      • Code block
      • Color picker
      • Color swatch
      • Date picker
      • Draggable
      • Drawer
      • Forms
        • Checkbox
        • Combobox
        • File upload
        • Input
        • Input group
        • Radio
        • Range
        • Select
        • Textarea
        • Toggle
      • Grid
      • Loaders
      • Menu
      • Modal
      • Notification
      • Pagination
      • Pane
      • Sheet
      • Status indicator
      • Stepper
      • Table
      • Tabs
      • Tags
      • Tiles
      • Timeline
      • Tooltip
      • Tooltip dialog
      • Typography
      • Well
    Table of Contents
    • How to use it
      • Default
      • Auto-expand
      • Hidden label
      • Manual resizing
    • Configuration
    • API
      • Field
      • Textarea

    Textarea

    A Textarea is a form control for multi-line text.


    Table of Contents
    • How to use it
      • Default
      • Auto-expand
      • Hidden label
      • Manual resizing
    • Configuration
    • API
      • Field
      • Textarea

    Used for this
    • To enter multi-line text

    How to use it

    Default

    By default, textarea height is fixed.

    Toggle dark mode
    Set primary hue
    Toggle RTL
    Open in CodeSandbox
    Copy code
    View code

    Auto-expand

    Textarea height can be configured to resize automatically based on user input.

    Toggle dark mode
    Set primary hue
    Toggle RTL
    Open in CodeSandbox
    Copy code
    View code

    Hidden label

    Textarea labels can be hidden.

    Toggle dark mode
    Set primary hue
    Toggle RTL
    Open in CodeSandbox
    Copy code
    View code

    Manual resizing

    Drag handles can be applied to a textarea for manual resizing.

    Toggle dark mode
    Set primary hue
    Toggle RTL
    Open in CodeSandbox
    Copy code
    View code

    Configuration

    • Name9.5.3•View source•View on npm
    • Installnpm install @zendeskgarden/react-forms
    • Depsnpm install react react-dom styled-components @zendeskgarden/react-theming
    • Importimport { Textarea, Field } from '@zendeskgarden/react-forms'

    API

    The Textarea component follows this structure:

    <Field>  <Field.Label />  <Textarea /></Field>

    Field

    A Field provides accessibility attributes to its child Textarea field by associating it with the corresponding Field.Label and Field.Hint.

    Field.Hint

    Extends HTMLAttributes<HTMLDivElement>

    Nest a Hint within a Field component.

    Field.Label

    Extends LabelHTMLAttributes<HTMLLabelElement>

    Nest a Label within a Field component.

    Prop nameTypeDefaultDescription
    hidden
    boolean

    Hides the label visually without hiding it from screen readers

    isRegular
    boolean

    Applies regular (non-bold) font weight

    Field.Message

    Extends HTMLAttributes<HTMLDivElement>

    The Message component applies appropriate icon and styles based on the validation provided. Nest it within a Field component.

    Prop nameTypeDefaultDescription
    validation
    'success' | 'warning' | 'error'

    Applies validation state styling

    validationLabel
    string

    Defines the aria-label for the validation icon

    Textarea

    Extends TextareaHTMLAttributes<HTMLTextAreaElement>

    Nest a Textarea within a Field component.

    Prop nameTypeDefaultDescription
    focusInset
    boolean

    Applies inset box-shadow styling on focus

    isBare
    boolean

    Removes borders and padding

    isCompact
    boolean

    Applies compact styling

    isResizable
    boolean

    Enables manual vertical resize

    maxRows
    number

    Defines the maximum height in rows

    minRows
    number

    Defines the minimum height in rows

    validation
    'success' | 'warning' | 'error'

    Applies validation state styling

    Garden is the design system by Zendesk.
    BlogGitHubVersions
    © Zendesk 2025