Value Box
value_box_es.RdValue Box
Usage
value_box_es_app(...)
value_box_es_ui(id, ...)
value_box_es_server(
id,
title,
value,
showcase = shiny::reactive(NULL),
theme_color = shiny::reactive(NULL)
)
value_box_es_ui_sdb(id, width = 12)
value_box_es_server_sdb(id, title, value, showcase, theme_color)
value_box_es_ui_bslib(id, min_height = "200px", ...)
value_box_es_server_bslib(id, title, value, showcase, theme_color)Arguments
- ...
Arguments passed on to
shiny::shinyApp,value_box_es_ui_sdb,value_box_es_ui_bslib,shinydashboard::valueBoxOutputuiThe UI definition of the app (for example, a call to
fluidPage()with nested controls).If bookmarking is enabled (see
enableBookmarking), this must be a single argument function that returns the UI definition.serverA function with three parameters:
input,output, andsession. The function is called once for each session ensuring that each app is independent.onStartA function that will be called before the app is actually run. This is only needed for
shinyAppObj, since in theshinyAppDircase, aglobal.Rfile can be used for this purpose.optionsNamed options that should be passed to the
runAppcall (these can be any of the following: "port", "launch.browser", "host", "quiet", "display.mode" and "test.mode"). You can also specifywidthandheightparameters which provide a hint to the embedding environment about the ideal height/width for the app.uiPatternA regular expression that will be applied to each
GETrequest to determine whether theuishould be used to handle the request. Note that the entire request path must match the regular expression in order for the match to be considered successful.enableBookmarkingCan be one of
"url","server", or"disable". The default value,NULL, will respect the setting from any previous calls toenableBookmarking(). SeeenableBookmarking()for more information on bookmarking your app.outputIdOutput variable name.
- id
The id string to be namespaced (optional).
- title, value
A string, number, or
htmltools::tag()child to display as the title or value of the value box. Thetitleappears above thevalue.- showcase
A
htmltools::tag()child to showcase (e.g., absicons::bs_icon(), aplotly::plotlyOutput(), etc).- theme_color
A reactive yielding a bootstrap 5 contextual class ("primary", "danger", etc.), which is applied to the value box. If outside of bootstrap 5, contextual classes are translated, as far as possible. Defaults to
NULL, in which no special class is applied.- width
The width of the box, using the Bootstrap grid system. This is used for row-based layouts. The overall width of a region is 12, so the default valueBox width of 4 occupies 1/3 of that width. For column-based layouts, use
NULLfor the width; the width is set by the column that contains the box.- min_height
The minimum height of the values box. Can be any valid CSS unit (e.g.,
min_height="200px").
Functions
value_box_es_app(): Test appvalue_box_es_ui(): Module UIvalue_box_es_server(): Module Servervalue_box_es_ui_sdb(): Module UI (shinydashboard)value_box_es_server_sdb(): Module Server (shinydashboard)value_box_es_ui_bslib(): Module UI (bslib)value_box_es_server_bslib(): Module Server (bslib)
Icons
Notice that only objects passable to bslib::value_box()
are accepted for the showcase argument,
such as bsicons::bs_icon() (recommended).
shiny::icon()s are not accepted.