> For the complete documentation index, see [llms.txt](https://docs.thingsup.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.thingsup.io/widgets/text-widget.md).

# Text Widget

**General Setting**

User can change following things in Text widget:

* Name for widget which will be used data referenceFor Example, if widget name is 'Text', then data of widget is referenced as Text.data
* Show title - User can show/hide widget title
* Title Color
* Background Color

![Configure Text Widget](/files/pA37wzjP0iyBhTXIaDAS)

**Widget Setting**

In Widget Setting option, user can change following parameters:

* Font Color&#x20;
* Font Size&#x20;
* Constant String - If this option is enabled, user can provide constant string value.
* Key - key parameter of JSON Object which will define data of Text Widget.

![Configure Text Widget](/files/Ax04ztUdBPBuillTcn7Z)

User can change value of Text Widget using MQTT or Actions. To change Text Widget, user need to send data in following format.

```
{"textKey":"Reports"}   

// 'textKey' is set as key in widget form.
```

#### Source <a href="#source" id="source"></a>

User can select a source mode as MQTT or Action.

**Using MQTT**

Here, to change value of Text Widget user can publish JSON object on given **data** MQTT topic. No need to provide \<account\_id> while providing the MQTT topic. The JSON object will be as below.

```
{"textKey":"Reports"}   

// 'textKey' is set as key in widget form.// 'dataKey' is set as key in widget form.
```

![Configure Text Widget](/files/nl6cAzuBp7YQTDI540qP)

**Using Action**

Here, to change value of Text Widget, output of the action should contain key-value pair with 'textKey' key. User can also update the widget either onLoad or periodically by providing refresh interval.

![Configure Text Widget](/files/G29jVzWW9RX0ftnUL8wE)

#### Event Handling

Text widget does not support any event.

#### Example

If we configure Text Widget as below:

1. constant string - disabled
2. key - testWidgetKey

and set source type for widget as MQTT and topic configured is 'data'. And if we publish following JSON Object over 'data' topic then Text Widget will look as shown in image.

```
// Data over configured MQTT Topic

{ 
    "testWidgetKey":"Reports"
}
```

![Test Widget Example](/files/dqqMRv54teDkZudvyyM9)
