UNPKG

1.2 kBMarkdownView Raw
1# Terra Search Field
2
3A search component with a field that automatically performs a search callback after user input.
4
5## Getting Started
6
7- Install with [npmjs](https://www.npmjs.com):
8 - `npm install terra-search-field`
9
10## Usage
11
12```jsx
13import React from 'react';
14import SearchField from 'terra-search-field';
15
16// Search Field with placeholder
17<SearchField placeholder="Search" />
18
19// Search Field with callback function and delay
20<SearchField searchDelay={500} onSearch={(searchText) => { console.log(searchText); }} />
21
22// Search Field with callback function and minimum search text length
23<SearchField minimumSearchTextLength={5} onSearch={(searchText) => { console.log(searchText); }} />
24
25```
26
27## Component Features
28* [Cross-Browser Support](https://github.com/cerner/terra-ui/blob/master/src/terra-dev-site/contributing/ComponentStandards.e.contributing.md#cross-browser-support)
29* [Responsive Support](https://github.com/cerner/terra-ui/blob/master/src/terra-dev-site/contributing/ComponentStandards.e.contributing.md#responsive-support)
30* [Mobile Support](https://github.com/cerner/terra-ui/blob/master/src/terra-dev-site/contributing/ComponentStandards.e.contributing.md#mobile-support)