React NativeScript

React NativeScript

  • Docs

›ELEMENTS: COMPONENTS

INTRODUCTION

  • Introduction

GETTING STARTED

  • Quick Start
  • Environment Setup
  • Using React Devtools

CORE CONCEPTS

  • Native Access
  • Navigation
  • Node Roles
  • Modals
  • Plugins
  • Styling

SAMPLES

  • Apps

ELEMENTS: LAYOUT

  • AbsoluteLayout
  • DockLayout
  • FlexboxLayout
  • GridLayout
  • StackLayout
  • WrapLayout

ELEMENTS: COMPONENTS

  • ActivityIndicator
  • ActionBar
  • ActionItem
  • Button
  • DatePicker
  • Frame
  • HtmlView
  • Image
  • Label
  • ListView
  • ListPicker
  • NavigationButton
  • Page
  • Placeholder
  • Progress
  • ScrollView
  • SearchBar
  • SegmentedBar
  • Slider
  • Switch
  • TabView
  • TabViewItem
  • TextField
  • TextView
  • TimePicker
  • WebView

LICENCES

  • Licences
Edit

SearchBar

<searchBar> is a UI component that provides a user interface for entering search queries and submitting requests to the search provider.

See also:

  • Official top-level documentation
  • Detailed API specification

import * as React from "react";

<searchBar hint="Search hint" text="searchPhrase" onTextChange={onTextChanged} onSubmit={onSubmit} onClose={onClose} />

Props

NameTypeDescription
hintstringSets placeholder text for the input area.
textstringSets the value of the search query.
textFieldBackgroundColorColorSets the background color of the input area.
textFieldHintColorColorSets the color of the placeholder text.
onTextChange(args:EventData) => voidEmitted when the text is changed.
onSubmit(args:EventData) => voidEmitted when the search input is submitted.
onClose(args:EventData) => voidEmitted when the search bar is closed.
onClear(args:EventData) => voidEmitted when the current search input is cleared through the X button in the input area.

Native Component

AndroidiOS
android.widget.SearchViewUISearchBar
Last updated by Jamie Birch
← ScrollViewSegmentedBar →
  • Props
  • Native Component
React NativeScript
Docs
Getting StartedUI Components Reference
Community
Stack OverflowChat on Slack in #reactTwitter
More
GitHub – React NativeScriptGitHub – Docs Site
Follow @LinguaBrowse
Copyright © 2021 Jamie Birch