ui.page_fluid

ui.page_fluid(*args, title=None, lang=None, theme=None, **kwargs)

Create a fluid page.

Parameters

*args : TagChild | TagAttrs = ()

UI elements.

title : Optional[str] = None

The browser window title (defaults to the host URL of the page). Can also be set as a side effect via panel_title.

lang : Optional[str] = None

ISO 639-1 language code for the HTML page, such as "en" or "ko". This will be used as the lang in the <html> tag, as in <html lang="en">. The default, None, results in an empty string.

theme : Optional[str | Path | Theme | ThemeProvider] = None

A custom Shiny theme created using the Theme class, or a path to a local or online CSS file that will replace the Bootstrap CSS bundled by default with a Shiny app. This file should be a complete bootstrap.css or bootstrap.min.css file. For advanced uses, you can also pass a Tagifiable object. In this case, Shiny will suppress the default Bootstrap CSS. To modify the theme of an app without replacing the Bootstrap CSS entirely, use include_css to add custom CSS.

****kwargs** : str = {}

Attributes on the page level container.

Returns

: Tag

A UI element.

See Also

Examples

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

## file: app.py
import matplotlib.pyplot as plt
import numpy as np

from shiny import App, Inputs, Outputs, Session, render, ui

app_ui = ui.page_fluid(
    ui.layout_sidebar(
        ui.sidebar(
            ui.input_slider("n", "N", min=0, max=100, value=20),
        ),
        ui.output_plot("plot"),
    )
)


def server(input: Inputs, output: Outputs, session: Session):
    @render.plot(alt="A histogram")
    def plot() -> object:
        np.random.seed(19680801)
        x = 100 + 15 * np.random.randn(437)

        fig, ax = plt.subplots()
        ax.hist(x, input.n(), density=True)
        return fig


app = App(app_ui, server)