Extends Item


A iOS styled text input field.

property String text

property Color textColor: #black

The field's text and text color.

property String font: "San Francisco"

property Float size: 14

The field's text font and size.

event accepted()

The text field's accepted event.

As the text is edited, the text property will update with any changes. When the user finishes editing the text, the accepted event will fire. This happens when either the field loses focus, or the return or done keys are pressed.

property String placeholder

A placeholder string to display when there is no other text in the text field.

Apple.TextField {
    placeholder: "Search..."

property Apple.TextField.Style style: .Rounded


Displays a rounded-style border for the text field.


The text field does not display a border.

property Apple.TextField.ClearButtonMode clearButtonMode: .Always


Show the clear button whenever the field has text.


Never show the clear button.


Show the clear button when the field is being edited and has content.


Show the clear button whenever the field has text and is not being edited.