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

Text area preview

Usage

import id.co.biofarma.binduiandroid.components.textarea.TextArea
TextArea(
    label = "label",
    required = true,
    placeholder = "default input",
    maxLength = "100",
    showCount = true,
    isError = false,
    disabled = false,
    rows = "10",
    maxRows = "default",
    helperText = "helperText",
    errorText = "default",
    value = "default",
    onChange = { value ->
        textValue = value
    }
)

Examples

Size

Use size for change size of text area component: sm, md or lg

Text area preview 2


Mode (Optional)

Use mode for change color mode of text area component: light or dark

Text area preview 3


Props

PropsRequiredDefaultTypedescription
idtrue-stringFor set the id of text area component.
labeltruelabelstringFor set the label of text area component.
requiredfalsefalsebooleanFor toggle required on or off.
placeholdertrueplaceholderstringFor set placeholder text of text area component.
maxLengthtrue100numberFor set maxLength of place holder text character.
showCountfalsefalsebooleanFor toggle character count show or hide.
isErrorfalsefalsebooleanFor toggle error or not-error.
disabledfalsefalsebooleanFor toggle disable or enable text area.
rowstrue10numberFor set rows of text area.
maxRowstruedefaultstringFor set maxrows of text area.
helperTextfalse-stringFor change helpertext of text area.
errorTextfalsedefaultstringFor change errortext of the text area.
valuefalsedefaultstringFor change value of the text area.
BIND © Biofarma Innovate Next-level Design .