# Text

The following extra arguments may be added to the option id ‘text’

<table data-header-hidden><thead><tr><th></th><th></th><th></th><th></th></tr></thead><tbody><tr><td><strong>Name</strong></td><td><strong>Type</strong></td><td><strong>Default</strong></td><td><strong>Description</strong></td></tr><tr><td>dynamic</td><td>Array</td><td></td><td><p>The text option supports dynamic content such as post title, excerpt, post id etc.</p><pre><code>  $options->add_option(
 'option_text',
   [
     'type'        => 'text',
     'description' => __( 'Set text description', 'zionbuilder' ),
     'title'       => __( 'Title text', 'zionbuilder' ),                
     'dynamic'     => [
         'enabled' => true,
   ],                
 ]
);
</code></pre></td></tr><tr><td>icon</td><td>String</td><td></td><td>Name of the icon that appears at the end of the input</td></tr><tr><td>clearable</td><td>Boolean</td><td></td><td>Controls if the ‘x’ icon which clears the input text should appear.</td></tr><tr><td>size</td><td>String</td><td></td><td>Can be ‘narrow’, ‘big’</td></tr><tr><td>error</td><td>Boolean</td><td>false</td><td>If true, will mark the field as red</td></tr></tbody></table>

<figure><img src="https://2798932742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKBGfOeYOvP45qYmu7SWy%2Fuploads%2F5yQUNuf0qn0MgJgl6BFC%2Fimage.png?alt=media&#x26;token=d61f5529-24ce-47a9-885b-0577b74c96f4" alt=""><figcaption><p>Text option with dynamic enabled and clearable true</p></figcaption></figure>

As a basic example:

```
public function options( $options ) {
        $options->add_option(
            'option_text',
            [
                'type'        => 'text',
                'description' => __( 'Set text description', 'zionbuilder' ),
                'title'       => __( 'Title text', 'zionbuilder' ),
                'default'     => __( 'Default string value', 'zionbuilder' ),
                'dynamic'     => [
                    'enabled' => true,
                ],
                'size'        => 'narrow',
                'icon'        => 'search',
                'clearable'   => true,
                'error'       => false,
            ]
        );

}
```
