# Taxonomy

[TwebBlockTaxonomyControl](https://github.com/tigriweb/components/blob/master/attributes/TwebBlockTaxonomyControl.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%2F0ZmGbRkGOvMKLSYpNyVr%2Ftaxonomy.jpg?alt=media&#x26;token=0e6e9bb7-4051-4779-9f12-913a7b2f5e05" alt=""><figcaption></figcaption></figure></div>

<details>

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

```jsx
/**
 * @param {string} [label] - Component label.
 * @param {string} [help] - Component description.
 * @param {string} taxonomy - The taxonomy name.
 * @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
"testCategory": {
	"type": "string",
	"default": ""
}
```
{% endcode %}

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

{% code title="index.js | edit()" %}
```jsx
<TwebBlockTaxonomyControl
	label={ __('Category Label', 'your-theme-name') }
	help={ __('Category Description', 'your-theme-name') }
	taxonomy="category"
	name="testCategory"
	{ ...{ attributes, setAttributes } }
/>
```
{% endcode %}
