Format#

The Format widget is used when you want to change the text whenever the window is displayed.

You need use getter to passing data to widget. (see passing data).

Code example:

from aiogram_dialog import Window
from aiogram_dialog.widgets.text import Format


async def getter_example(**kwargs):
    return {
        "name": "Tishka17",
    }


window = Window(
    Format("Hello, {name}!"),
    getter=getter_example,
    ...
)

Result:

../../../_images/format.png