Content-Length: 273342 | pFad | http://github.com/NativeScript/docs/blob/main/content/ui/search-bar.md

CD docs/content/ui/search-bar.md at main · NativeScript/docs · GitHub
Skip to content

Latest commit

 

History

History
141 lines (92 loc) · 2.59 KB

search-bar.md

File metadata and controls

141 lines (92 loc) · 2.59 KB
title description contributors
SearchBar
UI component for entering search queries.
rigor789
Ombuweb

<SearchBar> is a UI component that provides a user interface for entering search queries.

<<< @/../examples/typescript/src/ui/SearchBar/template.xml#example

<<< @/../examples/angular/src/ui/SearchBar/component.html#example

<<< @/../examples/react/src/components/ui/searchbar.tsx#example

<<< @/../examples/solid/src/ui/searchbar.tsx#example

<<< @/../examples/svelte/app/components/ui/SearchBar.svelte#example

<<< @/../examples/vue/src/ui/SearchBar/component.vue#example

Props

hint

hint: string

Gets or sets the placeholder text for the input area.

text

text: string

Gets or sets the value of the search query.

textFieldBackgroundColor

textFieldBackgroundColor: Color

Gets or sets the background color of the input area.

See Color.

textFieldHintColor

textFieldHintColor: Color

Gets or sets the color of the placeholder text.

See Color.

...Inherited

For additional inherited properties, refer to the API Reference

Events

textChange

on('textChange', (args: PropertyChangeData) => {
  const searchBar = args.object as SearchBar
  console.log('Search query:', args.value)
})

Emitted when the search text is changed.

See PropertyChangeData.

submit

on('submit', (args: EventData) => {
  const searchBar = args.object as SearchBar
  console.log('Search for:', searchBar.text)
})

Emitted when the search text is submitted.

clear

on('submit', (args: EventData) => {
  const searchBar = args.object as SearchBar
  console.log('SearchBar cleared')
})

Emitted when the search input is cleared through the button in the input area.

Native component









ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/NativeScript/docs/blob/main/content/ui/search-bar.md

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy