Skip to main content

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.

Widget Title

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 nameTypeDescriptionDefault
TitlestringValue that will be displayed in the widget.Title
Font sizenumberFont size of the widget text.20
Mobile font sizenumberFont size of the widget text on mobile devices.14
Font colorstring/colorColor of the widget text.#000000
Background colorstring/colorColor of the container background.#ffffff
Font familystringFont family of the widget text.sans-serif
Font weightstringFont weight of the widget text.normal
BoldbooleanWhether the widget text is bold.false

Position

Setting nameTypeDescriptionDefault
Horizontal alignmentleft | center | rightAlignment of the widget text.center
Vertical alignmenttop | center | bottomAlignment of the widget text.center
Elements directionhorizontal | verticalDirection of the widget text.horizontal
Text orientationhorizontal | vertical top to bottom | vertical bottom to top | vertical uprightOrientation 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 nameTypeDescriptionDefault
On eventnone | onClickWhether to activate the event onClick or notnone
Event variablestringName 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.