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

Create a fixed page.


*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 | ThemeProvider] = None

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.


Type Description
Tag A UI element.

See Also


#| 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_fixed(
            ui.input_slider("n", "N", min=0, max=100, value=20),

def server(input: Inputs, output: Outputs, session: Session):
    @render.plot(alt="A histogram")
    def plot() -> object:
        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)