77name | type | default | description | required
88-- | -- | -- | -- | --
99className | String | - | className of component | N
10- style | Object | - | CSS(Cascading Style Sheets),Typescript: ` React.CSSProperties ` | N
11- action | TNode | '' | Typescript: ` string \| TNode ` 。[ see more ts definition] ( https://github.com/Tencent/tdesign-mobile-react/blob/develop/src/common.ts ) | N
12- autocompleteOptions | Array | - | autocomplete words list。Typescript: ` Array<AutocompleteOption> ` ` type AutocompleteOption = string \| { label: string \| TNode; group?: boolean } ` 。[ see more ts definition] ( https://github.com/Tencent/tdesign-mobile-react/blob/develop/src/common.ts ) 。[ see more ts definition] ( https://github.com/Tencent/tdesign-mobile-react/tree/develop/src/search/type.ts ) | N
10+ style | Object | - | CSS(Cascading Style Sheets),Typescript: ` React.CSSProperties ` | N
11+ action | TNode | '' | Typescript: ` string \| TNode ` 。[ see more ts definition] ( https://github.com/Tencent/tdesign-mobile-react/blob/develop/src/common.ts ) | N
12+ autocompleteOptions | Array | - | autocomplete words list。Typescript: ` Array<AutocompleteOption> ` ` type AutocompleteOption = string \| { label: string \| TNode; group?: boolean } ` 。[ see more ts definition] ( https://github.com/Tencent/tdesign-mobile-react/blob/develop/src/common.ts ) 。[ see more ts definition] ( https://github.com/Tencent/tdesign-mobile-react/tree/develop/src/search/type.ts ) | N
1313center | Boolean | false | \- | N
1414clearable | Boolean | true | \- | N
15+ cursorColor | String | #0052d9 | ` 0.21.2 ` | N
1516disabled | Boolean | false | \- | N
1617focus | Boolean | false | \- | N
17- leftIcon | TNode | 'search' | Typescript: ` string \| TNode ` 。[ see more ts definition] ( https://github.com/Tencent/tdesign-mobile-react/blob/develop/src/common.ts ) | N
18+ leftIcon | TNode | 'search' | Typescript: ` string \| TNode ` 。[ see more ts definition] ( https://github.com/Tencent/tdesign-mobile-react/blob/develop/src/common.ts ) | N
1819placeholder | String | '' | \- | N
19- prefixIcon | TElement | - | ` deprecated ` 。Typescript: ` TNode ` 。[ see more ts definition] ( https://github.com/Tencent/tdesign-mobile-react/blob/develop/src/common.ts ) | N
20- readonly | Boolean | false | \- | N
20+ prefixIcon | TElement | - | ` deprecated ` 。Typescript: ` TNode ` 。[ see more ts definition] ( https://github.com/Tencent/tdesign-mobile-react/blob/develop/src/common.ts ) | N
21+ readonly | Boolean | undefined | \- | N
2122shape | String | 'square' | options: square/round | N
22- suffixIcon | TElement | - | ` deprecated ` 。Typescript: ` TNode ` 。[ see more ts definition] ( https://github.com/Tencent/tdesign-mobile-react/blob/develop/src/common.ts ) | N
23+ suffixIcon | TElement | - | ` deprecated ` 。Typescript: ` TNode ` 。[ see more ts definition] ( https://github.com/Tencent/tdesign-mobile-react/blob/develop/src/common.ts ) | N
2324value | String | - | \- | N
2425defaultValue | String | - | uncontrolled property | N
25- onActionClick | Function | | Typescript: ` ({}) => void ` <br /> | N
26- onBlur | Function | | Typescript: ` (context: { value: string; e: FocusEvent }) => void ` <br /> | N
27- onChange | Function | | Typescript: ` (value: string, context: { trigger: 'input-change' \| 'option-click'; e?: InputEvent \| MouseEvent }) => void ` <br /> | N
28- onClear | Function | | Typescript: ` (context: { e: MouseEvent }) => void ` <br /> | N
29- onFocus | Function | | Typescript: ` (context: { value: string; e: FocusEvent }) => void ` <br /> | N
30- onSearch | Function | | Typescript: ` (context?: { value: string; trigger: 'submit' \| 'option-click' \| 'clear'; e?: InputEvent \| MouseEvent }) => void ` <br /> | N
31- onSubmit | Function | | Typescript: ` (context: { value: string; e: KeyboardEvent }) => void ` <br /> | N
26+ onActionClick | Function | | Typescript: ` ({}) => void ` <br /> | N
27+ onBlur | Function | | Typescript: ` (context: { value: string; e: FocusEvent }) => void ` <br /> | N
28+ onChange | Function | | Typescript: ` (value: string, context: { trigger: 'input-change' \| 'option-click'; e?: InputEvent \| MouseEvent }) => void ` <br /> | N
29+ onClear | Function | | Typescript: ` (context: { e: MouseEvent }) => void ` <br /> | N
30+ onFocus | Function | | Typescript: ` (context: { value: string; e: FocusEvent }) => void ` <br /> | N
31+ onSearch | Function | | Typescript: ` (context?: { value: string; trigger: 'submit' \| 'option-click' \| 'clear'; e?: InputEvent \| MouseEvent }) => void ` <br /> | N
32+ onSubmit | Function | | Typescript: ` (context: { value: string; e: KeyboardEvent }) => void ` <br /> | N
3233
3334### CSS Variables
3435
@@ -39,6 +40,7 @@ Name | Default Value | Description
3940--td-search-bg-color | @bg-color-secondarycontainer | -
4041--td-search-clear-icon-color | @text-color-placeholder | -
4142--td-search-clear-icon-size | 24px | -
43+ --td-search-cursor-color | @brand-color | -
4244--td-search-font | @font-body-large | -
4345--td-search-height | 40px | -
4446--td-search-icon-color | @text-color-placeholder | -
0 commit comments