ui.output_text_verbatim(id, placeholder=False)

Create a output container for some text.

Place a text result in the user interface. Differs from output_text in that it wraps the text in a fixed-width container with a gray-ish background color and border.


id: str

An output id.

placeholder: bool = False

If the output is empty or None, should an empty rectangle be displayed to serve as a placeholder? (This does not affect behavior when the output is nonempty.)


Type Description
Tag A UI element

See Also


See output_text


#| standalone: true
#| components: [editor, viewer]
#| layout: vertical
#| viewerHeight: 400

## file: app.py
from shiny import App, Inputs, Outputs, Session, render, ui

app_ui = ui.page_fluid(
    ui.input_text("caption", "Caption:", "Data summary"),

def server(input: Inputs, output: Outputs, session: Session):
    def value():
        return input.caption()

app = App(app_ui, server)