> ## Documentation Index
> Fetch the complete documentation index at: https://help.dingtalk.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Search

> Documentation for the Search component, covering property configuration and event binding to enable keyword-based retrieval of page and form data.

## When to Use

* Use it to search page or form data.

## Component Example

## Component Properties

| Attribute            | Description                                                                 | Type                                                                     | Default                                                                                                                                  |
| -------------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------- |
| `autoFocus`          | Whether to autofocus.                                                       | `boolean`                                                                | `false`                                                                                                                                  |
| `dataSource`         | Sets the dropdown list values for the search box.                           | [SearchDataSource\[\]](/open/yida/components/interface#searchdatasource) | `[ { "label": "Tmall", "value": "value1" }, { "label": "Taobao", "value": "value2" }, { "label": "Alibaba Group", "value": "value3" } ]` |
| `defaultFilterValue` | Sets the default value of the selector when the selector button is enabled. | `string`                                                                 | `'one'`                                                                                                                                  |
| `defaultValue`       | Default value of the search box.                                            | `string`                                                                 | -                                                                                                                                        |
| `disabled`           | Whether to disable the component.                                           | `boolean`                                                                | `false`                                                                                                                                  |
| `filter`             | Sets the dropdown list values for the selector.                             | [SearchDataSource\[\]](/open/yida/components/interface#searchdatasource) | `[ { "label": "one", "value": "one" }, { "label": "two", "value": "two" }, { "label": "three", "value": "three" } ]`                     |
| `hasClear`           | Whether to show the clear button.                                           | `boolean`                                                                | `false`                                                                                                                                  |
| `isFilter`           | Whether to enable the selector.                                             | `boolean`                                                                | `false`                                                                                                                                  |
| `onChange`           | Triggered when the component value changes.                                 | `(value: string) => void`                                                | -                                                                                                                                        |
| `onFilterChange`     | Triggered when the selector value changes.                                  | `(filterValue: string) => void`                                          | -                                                                                                                                        |
| `onSearch`           | Triggered when the search button is clicked.                                | `(value: string) => void`                                                | -                                                                                                                                        |
| `placeholder`        | Default placeholder of the search box.                                      | `string`                                                                 | `'Please enter'`                                                                                                                         |
| `searchText`         | Text on the search button.                                                  | `string`                                                                 | `'Search'`                                                                                                                               |
| `shape`              | Shape of the search box.                                                    | `'normal' \| 'simple'`                                                   | `'normal'`                                                                                                                               |
| `size`               | Size.                                                                       | `'medium' \| 'large'`                                                    | `'medium'`                                                                                                                               |
| `type`               | Search style type.                                                          | `'normal' \| 'primary' \| 'secondary' \| 'dark'`                         | `'normal'`                                                                                                                               |
