ui.output_ui
ui.output_ui(id,
=False,
inline=None,
container=False,
fill=False,
fillable**kwargs,
)
Create a output container for a UI (i.e., HTML) element.
Parameters
id : str
-
An output id.
inline : bool = False
-
If
True
, the result is displayed inline. container : Optional[TagFunction] = None
-
A Callable that returns the output container.
fill : bool = False
-
Whether or not to allow the UI output to grow/shrink to fit a fillable container with an opinionated height (e.g., page_fillable).
fillable : bool = False
-
Whether or not the UI output area should be considered a fillable (i.e., flexbox) container.
****kwargs** : TagAttrValue = {}
-
Attributes to be applied to the output container.
Returns
: Tag
-
A UI element
See Also
Examples
#| standalone: true
#| components: [editor, viewer]
#| layout: vertical
#| viewerHeight: 400
## file: app.py
from shiny import App, Inputs, Outputs, Session, reactive, render, ui
app_ui = ui.page_fluid(
ui.input_action_button("add", "Add more controls"),
ui.output_ui("moreControls"),
)
def server(input: Inputs, output: Outputs, session: Session):
@render.ui
@reactive.event(input.add)
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)