Data Viewer Module Wrapped in a Card
Usage
data_viewer_card_ui(
id,
title = NULL,
full_screen = TRUE,
sidebar_title = NULL,
table_controls_position = c("top", "bottom"),
plot_color = NULL
)Arguments
- id
Module id.
- title
Optional card title.
- full_screen
Whether the wrapper card can enter full screen mode.
Optional title for the variable summary sidebar.
- table_controls_position
Where table pagination controls should appear. One of
"top"or"bottom".- plot_color
Optional CSS color used by the variable-summary mini plots. Accepts values such as
"#2c7fb8","rebeccapurple","rgb(44 127 184)", or"var(--bs-success)". IfNULL, the active Bootstrap primary color is used.
Examples
ui <- bslib::page_fillable(
theme = bslib::bs_theme(version = 5),
bslib::layout_columns(
col_widths = c(4, 8),
bslib::card(
bslib::card_header("Context"),
bslib::card_body("Supporting content")
),
data_viewer_card_ui(
"viewer",
title = "Dataset",
full_screen = FALSE
)
)
)
server <- function(input, output, session) {
data_viewer_server(
"viewer",
data = shiny::reactive(mtcars)
)
}
if (interactive()) {
shiny::shinyApp(ui, server)
}
