Search Box
Represents a Material UI styled search box for user input and search actions.
Overview
The SearchBox
view provides a customizable search bar with Material UI styling. A search button appears when text is entered, allowing users to trigger a search action.
To use the SearchBox
, initialize it with a binding to the search text and a closure for the search action. Optionally, provide a custom placeholder text.
Initializers
Creates a search box with a default placeholder text.
Creates a search box with a custom placeholder text.
Parameters
Parameter
Description
placeholder
The placeholder text to display when the search bar is empty.
searchText
A binding to the text that the user enters into the search bar.
action
A closure to execute when the user triggers the search action.
Example
Displays a search box with default placeholder text.
Displays a search box with custom placeholder.
Last updated