# ContactPicker

The user selects a component. The user can specify a person, or refer to the person field in the multidimensional table. `componentProps` supports the following parameters.
| parameter | type | description |
| ----------------- | --------- | ----------------------------------------- |
| placeholder | string | prompt text of input box |
| supportType | string[] | internal personnel selection type, `user` is an optional person, `group` is an optional group, both default personnel and groups are optional |
| supportCrossTypes | string[] | External personnel selection type, `user` is an optional person, `group` is an optional group, and both personnel and groups are optional by default |
| mode | string | selection mode, `single` is single selection, `multiple` is multiple selection, the default is multiple selection |
<br><br><br>
The data structure passed by `ContactPicker` to the `execute` function is a personnel array. There is only one element in the single-selection mode, and multiple elements in the multi-selection mode. The structure is as follows:
```js
{
id: string,
type: string,
}[]
```
| parameter | type | description |
| --------- | ------- | ------------------------ |
| id | string | person id |
| type | string | type of person, `user` is person, `group` is group |

# sample code

## call example

```js
import { basekit, Component } from '@lark-opdev/block-basekit-server-api';
basekit. addAction({
     formItems: [
       {
         itemId: 'users',
         label: 'User',
         component: Component. ContactPicker,
         componentProps: {
           placeholder: 'Please select user or group chat',
         }
       },
     ],
     execute: async function(args, context) {
       const { users = [] } = args;
     },
     //...
});
// ..
```