# Select

[TwebBlockSelectControl](https://github.com/tigriweb/components/blob/master/attributes/TwebBlockSelectControl.js)

<div align="left" data-full-width="false"><figure><img src="https://870798947-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWAokPCWM65E5XQJVixgi%2Fuploads%2FsPvTUy4zkqAKlp5pCZYN%2Fselect.jpg?alt=media&#x26;token=190af737-367b-41a1-950b-5671491fa6d2" alt=""><figcaption></figcaption></figure></div>

<details>

<summary>{ label, help, choices*, name*, onChange, attributes*, setAttributes* }</summary>

```jsx
/**
 * @param {string} [label] - Component label.
 * @param {string} [help] - Component description.
 * @param {object} choices - Object containing key-value pairs options.
 * @param {string} name - Attribute name.
 * @param {function} [onChange] - Callback called when the value changes.
 * @param {object} attributes - Object containing block attributes.
 * @param {function} setAttributes - Function to set new block attribute values.
 */
```

</details>

{% code title="block.json" overflow="wrap" %}
```json
"testSelect": {
	"type": "string",
	"default": "choice3"
}
```
{% endcode %}

{% code title="index.js" overflow="wrap" %}
```jsx
import {
	TwebBlockSelectControl,
} from '@tigriweb/components/attributes';
```
{% endcode %}

{% code title="index.js | edit()" %}
```jsx
<TwebBlockSelectControl
	label={ __('Select Label', 'your-theme-name') }
	help={ __('Select Description', 'your-theme-name') }
	choices={ {
		'choice1': __('Choise 1', 'your-theme-name'),
		'choice2': __('Choise 2', 'your-theme-name'),
		'choice3': __('Choise 3', 'your-theme-name'),
	} }
	name="testSelect"
	{ ...{ attributes, setAttributes } }
/>
```
{% endcode %}
