mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-10 00:27:41 +08:00
docs(searchbar): update readme and add angular usage
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
|
||||
Searchbars represent a text field that can be used to search through a collection. They can be displayed inside of a toolbar or the main content.
|
||||
|
||||
A Searchbar should be used instead of an input to search lists. A clear button is displayed on input in the searchbar's text field. Clicking on the clear button will erase the text field and the input focused. A cancel button can be enabled which will clear the input and remove focus.
|
||||
A Searchbar should be used instead of an input to search lists. A clear button is displayed upon entering input in the searchbar's text field. Clicking on the clear button will erase the text field and the input will remain focused. A cancel button can be enabled which will clear the input and lose the focus upon click.
|
||||
|
||||
|
||||
|
||||
|
||||
30
core/src/components/searchbar/usage/angular.md
Normal file
30
core/src/components/searchbar/usage/angular.md
Normal file
@ -0,0 +1,30 @@
|
||||
```html
|
||||
<!-- Default Searchbar -->
|
||||
<ion-searchbar></ion-searchbar>
|
||||
|
||||
<!-- Searchbar with danger color -->
|
||||
<ion-searchbar color="danger"></ion-searchbar>
|
||||
|
||||
<!-- Searchbar with value -->
|
||||
<ion-searchbar value="Ionic"></ion-searchbar>
|
||||
|
||||
<!-- Searchbar with telephone type -->
|
||||
<ion-searchbar type="tel"></ion-searchbar>
|
||||
|
||||
<!-- Searchbar with a cancel button and custom cancel button text -->
|
||||
<ion-searchbar showCancelButton cancelButtonText="Custom Cancel"></ion-searchbar>
|
||||
|
||||
<!-- Searchbar with a custom debounce -->
|
||||
<ion-searchbar debounce="500"></ion-searchbar>
|
||||
|
||||
<!-- Animated Searchbar -->
|
||||
<ion-searchbar animated></ion-searchbar>
|
||||
|
||||
<!-- Searchbar with a placeholder -->
|
||||
<ion-searchbar placeholder="Filter Schedules"></ion-searchbar>
|
||||
|
||||
<!-- Searchbar in a Toolbar -->
|
||||
<ion-toolbar>
|
||||
<ion-searchbar></ion-searchbar>
|
||||
</ion-toolbar>
|
||||
```
|
||||
Reference in New Issue
Block a user