page: Modern Bootstrap page layouts

View source: R/page.R

pageR Documentation

Modern Bootstrap page layouts

Description

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)

Arguments

...

UI elements for the page. Named arguments become HTML attributes.

title

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

theme

A bs_theme() object.

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.

Functions

  • page(): A bslib wrapper for shiny::bootstrapPage(), a basic Boostrap page where the content is added directly to the page body.

  • page_fluid(): A bslib wrapper for shiny::fluidPage(), a fluid Bootstrap-based page layout that extends to the full viewport width.

  • page_fixed(): A bslib wrapper for shiny::fixedPage(), a fixed Bootstrap-based page layout where the page content container is centered horizontally and its width is constrained.

See Also

Dashboard-style pages: page_sidebar(), page_navbar(), page_fillable().


rstudio/bootstraplib documentation built on Dec. 16, 2024, 2:22 p.m.