UITextarea

Create a textarea base on style guide

Since: 6.4.0 (6.3.0)

Properties

Name

Type

Default

Description

id

string

Required - Id of the textarea

value

string

Required - Value for textarea

label

string

The text label

placeholder

string

Placeholder for textarea

size

string

Size and feeling for textarea

variant

string

Variant of the textarea

rows

number

3

Textarea rows presentation

disabled

boolean

false

Wether the textarea is disabled or not

onChange

function

Required - Callback for when the textarea value changes

Example

import {UITextarea} from 'writer'

render($$) {
    const el = $$('div')
    return el.append(
        $$(UITextarea, {
            id: 'myTextarea',
            label: this.getLabel('Textarea label'),
            value: '',
            rows: 5,
            onChange: (value) => {
                // Do something
            }
        })
    )
}

Last updated