shiny.ui.output_ui(id, inline=False, container=None, **kwargs)#

Create a output container for a UI (i.e., HTML) element.

  • id (str) – An input id.

  • inline (bool) – If True, the result is displayed inline

  • container (Optional[TagFunction]) – A Callable that returns the output container.

  • kwargs (Union[str, float, bool, None]) – Attributes to be applied to the output container.

Return type

A UI element

See also

ui, output_text


#| standalone: true
#| components: [editor, viewer]
#| layout: vertical
#| viewerHeight: 400
from shiny import *

app_ui = ui.page_fluid(
    ui.input_action_button("add", "Add more controls"),

def server(input: Inputs, output: Outputs, session: Session):
    def moreControls():
        return ui.TagList(
            ui.input_slider("n", "N", min=1, max=1000, value=500),
            ui.input_text("label", "Label"),

app = App(app_ui, server)