@wfp/react
Version:
WFP UI Kit
23 lines (18 loc) • 709 B
text/mdx
**Search** enables users to specify a word or a phrase to find particular relevant pieces of content without the use of navigation. Search can be used as the primary means of discovering content, or as a filter to aid the user in finding content.
```js
import { Search } from '@wfp/react';
const handleOnChange = (searchValue, evt) => {
console.log('searchValue', searchValue); // a string
console.log('evt', evt); // the whole event object
};
<Search
className="some-class"
kind="large"
name="input-name"
labelText="Label"
closeButtonLabelText="The label text for the close button (closeButtonLabelText)"
placeholder="Placeholder"
onChange={handleOnChange}
/>;
```