Text areas allow users to input longer amounts of text than a text field.


    Component Status

    image2020-8-14_10-41-45.png Design Kit:                                               RELEASED

    image2020-8-14_10-49-41.pngBobwai component: bobwai--textarea    RELEASED

    Usage

    When the expected user input is more than one sentence. Use the text field component for single-line inputs.

    DO

    Always use a label to describe a text area.

    DO NOT

    Do not use for short texts.

    Anatomy

    Component consists of:

    • Label
      • Text areas should always have a label.
      • Labels can be placed either on top or on the side of the field, depending on the alignment of the form.
    • Placeholder (optional) - Is temporary and disappears once a user enters text.
    • Note (optional) 
      • Provides assistance on how to fill out the field. Used for essential information. 
      • Use a tooltip for context or background information that is “nice to have".

    Label Position

    Labels can be placed either on top or on the side of the field.

    Horizontal labels (default)

    Most useful when the vertical space is limited.

    Vertical labels

    Recommended for narrow spaces as panels or mobile devices.

    Variants

    Error Icon (Invalid)

    Indicates an error. 

    Warning icon 

    Indicates an attention

    Appearance

    Width

    The width of the field should match the length of the expected data input. Widths of fields are predefined by the grid.

    Read more about how to use grid in forms.

    Height

    Text areas are set in predefined heights. When it is necessary the possibility to change height of input can be activated.

    Behavior

    States

    Read-only 

    Allows for content to be copied, but not interacted with or changed.

    Disabled 

    Cannot be interacted with but remains visible to the user in a disabled visual style. 

    Validation

    Client-side validation - It is recommend to validate the user’s data before form submission. Fields are validated upon losing focus.

    Typical client error validations are:

    • Incorrectly formatted data
    • Leaving a required field blank
    • Leaving a required field incomplete

    Server-side validation - Where real-time validation is not possible or does not make sense, all fields are validated at the same time upon the page submission. 

    Density 

    Default  

    Most of the use cases.

    Small (Condensed) 

    Technical applications, e.g. Scaler.

    Responsivity

    Text inputs support mobile responsive behaviour:

    By default, labels are aligned vertically for narrow containers (max width 400 px). 

    Horizontal labels can used for narrow containers when vertical space is limited.

    Keyboard Interactions

    Key Interaction
    Tab Tabbing into a text field selects the existing text in input.

    Editorial

    • Labels - Use sentence case. Keep the text short and specific.
    • Placeholders - An actual example of what the user should write


    Related Components

    Text field - when the expected input is just one row or sentence.

    Used in  Type px Token
    Input Text Color

    color-text-100

    Resize Icon Color
    color-icon-100
    Icons (all) Object sizes
    sizing-icon-200
    Background Color

    color-bg-input

    Border Color
    color-border-input
    Input Text Font

    font-basic

    Border Border-width 1 border-width-100
    Border Border-radius 4
    radius-input-100
    Input text (Placeholder) Font
    font-placeholder
    Input text (Placeholder) Color
    color-text-300
    Label & note Color
    color-text-100
    Label & note Font
    font-label
    Required field (asterisk sign) Color
    color-error

    Interactive States

    Used In Type PX Token
    Hover


    Border Color
    color-border-100
    Selected/Focus
    Border Color
    color-border-500
    Border Border-width 2
    border-width-200
    Disabled
    Whole object  Opacity
    opacity-disabled
    Whole object Cursor

    cursor: not-allowed;

    Read Only
    Text Font
    font-body
    Border Border-width 0 border-width-none
    Error
    Background Color
    color-bg-input-error
    Border Color
    color-border-error
    Text Color
    color-text-error
    Notification icon Color
    color-icon-error
    Warning
    Background Color
    color-bg-input-warning
    Border Color
    color-border-warning
    Text Color
    color-text-warning
    Notification icon Color
    color-icon-warning

    Spacing

    Used in Type PX Token
    Minimal space between label and input Spacing 12 spacing-400
    Default size padding Spacing 8 spacing-300
    Default size space between input and notification icon Spacing 4 spacing-200
    Small/condensed minimal space between label and input Spacing 8 spacing-300
    Small/condensed size padding Spacing 4 spacing-200
    Small/Condensed size space between input and notification icon Spacing 2 spacing-100

    Accessibility







    Attachments:

    image2020-10-5_10-17-0.png (image/png)
    image2020-10-5_10-25-57.png (image/png)
    image2020-10-5_10-26-24.png (image/png)
    image2020-10-5_10-26-47.png (image/png)
    image2020-10-2_15-23-33.png (image/png)
    image2020-10-2_13-45-41.png (image/png)
    image2020-10-2_13-46-8.png (image/png)
    image2020-10-5_10-52-58.png (image/png)
    image2020-10-5_10-53-29.png (image/png)
    image2020-10-5_10-54-33.png (image/png)
    image2020-10-5_10-54-40.png (image/png)
    image2020-10-5_10-55-2.png (image/png)
    image2020-10-5_11-37-46.png (image/png)
    image2020-10-2_14-20-45.png (image/png)
    image2020-10-2_14-21-11.png (image/png)
    image2020-10-2_14-20-58.png (image/png)
    image2020-10-2_14-21-26.png (image/png)
    image2020-10-2_14-33-47.png (image/png)
    image2020-10-2_14-34-9.png (image/png)
    image2020-10-2_14-25-18.png (image/png)
    image2020-10-2_14-25-33.png (image/png)
    image2020-10-2_14-42-44.png (image/png)
    image2020-10-23_15-38-49.png (image/png)
    image2020-10-26_13-21-57.png (image/png)
    image2020-10-26_13-22-16.png (image/png)
    image2020-10-26_13-22-55.png (image/png)
    image2020-10-26_13-24-0.png (image/png)
    image2020-10-26_13-26-26.png (image/png)
    textarea-style@2x.png (image/png)
    textarea@2x.png (image/png)
    textarea@2x.png (image/png)
    textarea@2x.png (image/png)
    text-area-anatomy.png (image/png)
    text-area-label-horizontal.png (image/png)
    text-area-label-vertical.png (image/png)
    text-area-state-readonly.png (image/png)
    text-area-state-disabled.png (image/png)
    text-area-validation.png (image/png)
    text-area-style.png (image/png)
    text-area-label-horizontal.png (image/png)
    text-area-state-selected.png (image/png)
    text-area-state-disabled.png (image/png)
    text-area-state-readonly.png (image/png)
    text-area-variants-error-icon.png (image/png)
    text-area-variants-warning-icon.png (image/png)
    text-area-state-focus.png (image/png)
    text-input-density-small.png (image/png)
    text-area-density-default.png (image/png)
    text-area-density-small.png (image/png)
    text-input-variants-warning-icon.png (image/png)
    text-area-variants-error-icon.png (image/png)
    text-area-variants-warning-icon.png (image/png)
    image2020-11-2_9-24-56.png (image/png)
    image2020-11-2_9-26-14.png (image/png)
    image2020-11-2_9-26-30.png (image/png)
    text-area-title.png (image/png)
    text-area-anatomy.png (image/png)
    text-input-type-default.png (image/png)
    text-area-label-horizontal.png (image/png)
    text-area-label-vertical.png (image/png)
    text-area-variants-error-icon.png (image/png)
    text-area-variants-warning-icon.png (image/png)
    text-area-state-readonly.png (image/png)
    text-area-state-disabled.png (image/png)
    text-area-variants-error-icon.png (image/png)
    text-area-validation.png (image/png)
    text-area-validation.png (image/png)
    text-area-density-default.png (image/png)
    text-area-density-small.png (image/png)
    text-area-style.png (image/png)
    text-area-style-states.png (image/png)
    text-area-style-padding.png (image/png)
    text-area-resize.png (image/png)