Skip to contents

Create a flexbox based page

Usage

flexPage(..., title = NULL, fill_page = TRUE, dependency = bootstrapLib())

Arguments

...

Tag attributes (named arguments) and children (unnamed arguments). A named argument with an NA value is rendered as a boolean attributes. Named arguments can be used to provide additional values to the container of the grid.

For a full list of valid HTML attributes check visit https://www.w3schools.com/tags/ref_attributes.asp.

Children may include any combination of:

  • Other tags objects

  • HTML() strings

  • htmlDependency()s

  • Single-element atomic vectors

title

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

fill_page

Flag to tell the page if it should adjust the page to adjust and fill the browser window size

dependency

The set of web dependencies. This value can be a htmlDependency, for example the shiny bootstrap one (the default) or a tagList with diferent dependencies

Value

A UI definition that can be passed to the shinyUI function.

Note

See https://css-tricks.com/snippets/css/a-guide-to-flexbox/ for additional details on using css flexbox

See also

Examples

if (interactive()) {
library(shiny)
library(imola)
ui <- flexPage(
  title = "A flex page",
  div(class = "area-1", "Area 1 content"),
  div(class = "area-2", "Area 2 content"),
  div(class = "area-3", "Area 3 content")
)

server <- function(input, output) {}
shinyApp(ui, server)
}