Options
All
  • Public
  • Public/Protected
  • All
Menu

Textarea field powered by Angular Material library.

Example of usage

export const component: DraymanComponent = async ({ forceUpdate }) => {
    let text = 'Hello, <b>world</b>!';

    const onValueChange = async ({ value }) => {
        text = value;
        await forceUpdate();
    }

    return () => {
        return (
            <div>
                <drayman-textarea-field
                    label="Text"
                    onValueChange={onValueChange}
                    value={text}
                />
                {text && <p>{text}</p>}
            </div>
        )
    };
}

Hierarchy

Index

Properties

Optional appearance

appearance: "legacy" | "standard" | "fill" | "outline"

Appearance style for the field. Wether outline (default), legacy, fill or standard.

Optional disabled

disabled: boolean

Whether the control is disabled.

Optional error

error: string

Error text to be shown underneath the form field control.

Optional helpText

helpText: string

Hint text to be shown underneath the form field control.

Optional label

label: string

The floating label for a field.

Optional onValueChange

onValueChange: ElementEvent<{ value: string }>

Executed with an input value from user.

Optional placeholder

placeholder: string

The placeholder text.

Optional ref

ref: string

Optional rows

rows: number

The number of visible text lines for the control.

Optional style

style: CSS

Optional updateOnBlur

updateOnBlur: boolean

Wether value of the field should be emitted when user is blurred out of the control.

Optional value

value: string

Value of the input.