page_sidebar | R Documentation |
Create a dashboard layout with a full-width header (title
) and sidebar()
.
page_sidebar(
...,
sidebar = NULL,
title = NULL,
fillable = TRUE,
fillable_mobile = FALSE,
theme = bs_theme(),
window_title = NA,
lang = NULL
)
... |
UI elements to display in the 'main' content area (i.e., next to
the |
sidebar |
A |
title |
A string, number, or |
fillable |
Whether or not the |
fillable_mobile |
Whether or not the page should fill the viewport's height on mobile devices (i.e., narrow windows). |
theme |
A |
window_title |
the browser window title. The default value, |
lang |
ISO 639-1 language code for the HTML page, such as "en" or "ko".
This will be used as the lang in the |
Getting Started with Dashboards on the bslib website.
layout_columns()
and layout_column_wrap()
for laying out content
into rows and columns.
accordion()
for grouping related input controls in the sidebar
.
card()
for wrapping outputs in the 'main' content area.
value_box()
for highlighting values.
Other Dashboard page layouts:
page_fillable()
,
page_navbar()
library(shiny)
library(ggplot2)
ui <- page_sidebar(
title = "Example dashboard",
sidebar = sidebar(
varSelectInput("var", "Select variable", mtcars)
),
card(
full_screen = TRUE,
card_header("My plot"),
plotOutput("p")
)
)
server <- function(input, output) {
output$p <- renderPlot({
ggplot(mtcars) + geom_histogram(aes(!!input$var))
})
}
shinyApp(ui, server)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.