# Text

[TwebMetaTextControl](https://github.com/tigriweb/components/blob/master/meta/TwebMetaTextControl.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%2FqYOjhPih8fM4cIdcAdHR%2Ftext.jpg?alt=media&#x26;token=72baf5ce-6139-4453-a279-f505934d96b2" alt=""><figcaption></figcaption></figure></div>

<details>

<summary>{ label, help, type, metaKey* }</summary>

```jsx
/**
 * @param {string} [label] - Component label.
 * @param {string} [help] - Component description.
 * @param {string} [type] - Input type: text, email, url, number, date.
 * @param {string} metaKey - Registered meta key from register_post_meta().
 */
```

</details>

{% code title="functions.php" overflow="wrap" %}

```php
register_post_meta( 'post_type_name', 'test_text', array(
	'type'         => 'string',
	'default'      => '',
	'single'       => true,
	'show_in_rest' => true,
) );
```

{% endcode %}

{% code title="index.js" overflow="wrap" %}

```jsx
import {
	TwebMetaTextControl,
} from '@tigriweb/components/meta';
```

{% endcode %}

{% code title="index.js | PanelBody" %}

```jsx
<TwebMetaTextControl
	label={ __('Text Label', 'your-theme-name') }
	help={ __('Text Description', 'your-theme-name') }
	metaKey="test_text"
/>
```

{% endcode %}
