Download this notebook from GitHub (right-click to download).

import panel as pn

The StaticText widget displays a text value but does not allow editing it.

For more information about listening to widget events and laying out widgets refer to the widgets user guide. Alternatively you can learn how to build GUIs by declaring parameters independently of any specific widgets in the param user guide. To express interactivity entirely using Javascript without the need for a Python server take a look at the links user guide.


For layout and styling related parameters see the customization user guide.

  • name (str): The title of the widget

  • value (str): Parsed datetime value

static_text = pn.widgets.StaticText(name='Static Text', value='A string')


StaticText.value returns a string that can be read out but cannot be set like other widgets:

'A string'


The TextAreaInput widget exposes a number of options which can be changed from both Python and Javascript. Try out the effect of these parameters interactively:

pn.Row(static_text.controls(jslink=True), static_text)
This web page was generated from a Jupyter notebook and not all interactivity will work on this website. Right click to download and run locally for full Python-backed interactivity.

Download this notebook from GitHub (right-click to download).