Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork81
TeamWertarbyte/material-ui-search-bar
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
See this component inaction
npm i --save material-ui-search-bar
Note: If you're still using Material-UI v3, please install v0.x of the search bar usingnpm i --save material-ui-search-bar@beta
TheSearchBar is acontrolled input, meaning thatyou need to keep the input state. This allows for much flexibility, e.g. you can change and clear the search input just by changing its props.
importSearchBarfrom"material-ui-search-bar";// *snip*return(<SearchBarvalue={this.state.value}onChange={(newValue)=>this.setState({value:newValue})}onRequestSearch={()=>doSomethingWith(this.state.value)}/>);
| Name | Type | Default | Description |
|---|---|---|---|
| cancelOnEscape | bool | Whether to clear search on escape | |
| classes* | object | Override or extend the styles applied to the component. | |
| className | string | '' | Custom top-level class |
| closeIcon | node | <ClearIcon style={{ color: grey[500] }} /> | Override the close icon. |
| disabled | bool | false | Disables text field. |
| onCancelSearch | func | Fired when the search is cancelled. | |
| onChange | func | Fired when the text value changes. | |
| onRequestSearch | func | Fired when the search icon is clicked. | |
| placeholder | string | 'Search' | Sets placeholder text for the embedded text field. |
| searchIcon | node | <SearchIcon style={{ color: grey[500] }} /> | Override the search icon. |
| style | object | null | Override the inline-styles of the root element. |
| value | string | '' | The value of the text field. |
* required property
Any other properties supplied will be spread to the underlyingInput component.
The files included in this repository are licensed under the MIT license.
About
Material design search bar
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.
