Str#
Download this notebook from GitHub (right-click to download).
import panel as pn
pn.extension()
The Str pane allows rendering arbitrary text in a panel. Unlike Markdown and HTML, a Str is interpreted as a raw string without applying any markup and is displayed in a fixed-width font by default. The pane will render any text, and if given an object will display the object’s Python repr.
Parameters:#
For layout and styling related parameters see the customization user guide.
object(str or object): The string to display. If a non-string type is supplied, thereprof that object is displayed.style(dict): Dictionary specifying CSS styles
str_pane = pn.pane.Str('This is a raw string which will not be formatted in any way except for the applied style.', style={'font-size': '12pt'})
str_pane
Like other panes the Str pane can be updated by setting its object parameter. As mentioned above, non-string types are automatically cast to a string:
str_pane.object = 1.3234232
Download this notebook from GitHub (right-click to download).