These functions are small wrappers around shiny's page constructors (i.e., shiny::fluidPage(), shiny::navbarPage(), etc) that differ in two ways:

• The theme parameter defaults bslib's recommended version of Bootstrap (for new projects).

• The return value is rendered as an static HTML page when printed interactively at the console.

## Usage

page(..., title = NULL, theme = bs_theme(), lang = NULL)

page_fluid(..., title = NULL, theme = bs_theme(), lang = NULL)

page_fixed(..., title = NULL, theme = bs_theme(), lang = NULL)

page_fill(
...,
fill_mobile = FALSE,
title = NULL,
theme = bs_theme(),
lang = NULL
)

page_navbar(
...,
title = NULL,
id = NULL,
selected = NULL,
sidebar = NULL,
fillable = FALSE,
fill_mobile = FALSE,
position = c("static-top", "fixed-top", "fixed-bottom"),
footer = NULL,
bg = NULL,
inverse = "auto",
collapsible = TRUE,
fluid = TRUE,
theme = bs_theme(),
window_title = NA,
lang = NULL
)

## Arguments

...

The contents of the document body.

title

The browser window title (defaults to the host URL of the page)

theme

One of the following:

• NULL (the default), which implies a "stock" build of Bootstrap 3.

• A bslib::bs_theme() object. This can be used to replace a stock build of Bootstrap 3 with a customized version of Bootstrap 3 or higher.

• A character string pointing to an alternative Bootstrap stylesheet (normally a css file within the www directory, e.g. www/bootstrap.css).

lang

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 (NULL) results in an empty string.

Padding to use for the body. This can be a numeric vector (which will be interpreted as pixels) or a character vector with valid CSS lengths. The length can be between one and four. If one, then that value will be used for all four sides. If two, then the first value will be used for the top and bottom, while the second value will be used for left and right. If three, then the first will be used for top, the second will be left and right, and the third will be bottom. If four, then the values will be interpreted as top, right, bottom, and left respectively.

fill_mobile

Whether or not fillable pages should fill the viewport's height on mobile devices (i.e., narrow windows).

id

a character string used for dynamically updating the container (see nav_select()).

selected

a character string matching the value of a particular nav() item to selected by default.

sidebar

A sidebar() component to display on every nav() page.

fillable

Whether or not to allow fill items to grow/shrink to fit the browser window. If TRUE, all nav() pages are fillable. A character vector, matching the value of nav()s to be filled, may also be provided. Note that, if a sidebar is provided, fillable makes the main content portion fillable.

position

Determines whether the navbar should be displayed at the top of the page with normal scrolling behavior ("static-top"), pinned at the top ("fixed-top"), or pinned at the bottom ("fixed-bottom"). Note that using "fixed-top" or "fixed-bottom" will cause the navbar to overlay your body content, unless you add padding, e.g.: tags\$style(type="text/css", "body {padding-top: 70px;}")

UI element(s) (tags) to display above the nav content.

footer

UI element(s) (tags) to display below the nav content.

bg

a CSS color to use for the navbar's background color.

inverse

Either TRUE for a light text color or FALSE for a dark text color. If "auto" (the default), the best contrast to bg is chosen.

collapsible

TRUE to automatically collapse the navigation elements into a menu when the width of the browser is less than 940 pixels (useful for viewing on smaller touchscreen device)

fluid

TRUE to use fluid layout; FALSE to use fixed layout.

window_title

the browser window title. The default value, NA, means to use any character strings that appear in title (if none are found, the host URL of the page is displayed by default).

shiny::bootstrapPage()
shiny::fluidPage()
shiny::fixedPage()
shiny::fillPage()
shiny::navbarPage()