Extends Item

Material.TextField

A material design styled text input field.

property Bool enabled: true

True if the field is enabled, false otherwise. A disabled field has a dimmed appearance and wont accept user input.

property Material.TextField.Style style: .Filled

The text field style.

Material.TextField.Style.Filled

Material.TextField.Style.Outlined

property Color accentColor: #teal

The accent color, used for the colorful highlights on the text field.

property String text

property Text.WrapMode wrapMode: .SingleLine

The field's primary text and text wrapMode.

property String labelText

The label text is shown as a placeholder for the primary text when the field is empty, and shown as a label when the primary text is set.

The following example demonstrates the appearance of the label text for both field styles.

property String helperText

Helper text is shown directly below the text field, and can be used as a hint or to indicate an error.

property Bool errored: false

When true, communicates to the user that there is an error in their input. This is often used in conjunction with helperText to explain the error.