Title
The Title widget is used to display any text in a particular style. It is often used as a visual title for your data app or to indicate different sections.
Markdown blocks are an alternative to this widget and vice versa. However, you have special features in the widget title that you can't use in markdown blocks, such as the ability to interpolate Python variables.
Basic usage
To use the Title widget, you only need to set a value to display. This value can be static (introduced directly in the form) or dynamic (by reading a Python variable). In this case, we will create a Python string:
my_title = 'Hello world!'
Then, execute the block and create a Title widget. On the Title property, enter the $my_title
variable name. Save the widget and the content will display.
API reference
Basic
| Setting name | Type | Description | Default |
|---|---|---|---|
Title | string | Value that will be displayed in the widget. | Title |
Font size | number | Font size of the widget text. | 20 |
Mobile font size | number | Font size of the widget text on mobile devices. | 14 |
Font color | string/color | Color of the widget text. | #000000 |
Background color | string/color | Color of the container background. | #ffffff |
Font family | string | Font family of the widget text. | sans-serif |
Font weight | string | Font weight of the widget text. | normal |
Bold | boolean | Whether the widget text is bold. | false |
Position
| Setting name | Type | Description | Default |
|---|---|---|---|
Horizontal alignment | left | center | right | Alignment of the widget text. | center |
Vertical alignment | top | center | bottom | Alignment of the widget text. | center |
Elements direction | horizontal | vertical | Direction of the widget text. | horizontal |
Text orientation | horizontal | vertical top to bottom | vertical bottom to top | vertical upright | Orientation of the widget text. | horizontal |
Events
The Events settings let you trigger actions in response to clicks on the widget elements. When the event is activated, the current block and the subsequent blocks are executed.
| Setting name | Type | Description | Default |
|---|---|---|---|
On event | none | onClick | Whether to activate the event onClick or not | none |
Event variable | string | Name of the variable to store the data when the event is triggered |
See also
- All widgets — browse the full widget catalog.
- Image — add visual elements alongside your titles.