Extends Item

Apple.SearchBar

An iOS style search bar.

property Apple.SearchBar.Style style: .Prominent

The search bar style, which defines the default values of the search bar colors.

Apple.SearchBar.Style.Prominent

Apple.SearchBar.Style.Minimal

property String text

property Color textColor: #Apple.Label

The search text and search text color.

property String placeholder

Placeholder text to be shown when there is no search text.

Apple.SearchBar {
    placeholder: "Artist"
}

event accepted()

The accepted event is fired when the user hits return or search on the keyboard.

property Apple.SearchBar.PlaceholderAlignment placeholderAlignment: .Center

Specifies whether the placeholder text and search icon are centered or left aligned in the SearchBar.

Apple.SearchBar.PlaceholderAlignment.Left

Apple.SearchBar.PlaceholderAlignment.Center

property Color color: #Apple.TertiaryFill

property Color secondaryColor: #Apple.SecondaryLabel

property Color backgroundColor: #Apple.Background

property Color clearButtonColor: #Apple.Gray

The color, secondaryColor, backgroundColor and clearButtonColor properties set the colors used for different components of the search bar.

The color property sets the background color of the inner search entry field.

The secondaryColor property controls the color of the icons and placeholder text within the search entry field.

The backgroundColor property defines the overall background color of the search bar when using the Prominent style. It has no effect with the minimal style.

The clearButtonColor property sets the color used for the clear text button when it is visible.