dq_infobox: Creates an info box with given texts

Description Usage Arguments Value Author(s) Examples

View source: R/dq_infobox.R

Description

Creates an info box with given texts

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
dq_infobox(
  title,
  value = NULL,
  subtitle = NULL,
  icon = NULL,
  bg_color = "#FF8F00",
  color = "white",
  width = 4,
  href = NULL,
  fill = TRUE
)

Arguments

title

Title of the box.

value

Optional, value to show under the title.

subtitle

Optional, subtitle to show under the value.

icon

Optional, icon to show on the left, can be any string, shiny icon or just NULL to omit it.

bg_color

Optional, sets the background color of the box, can be any valid html color, standard is dq primary orange.

color

Optional, sets the font color of the box, can be any valid html color, standard is white.

width

Optional, width of the box measured in bootstrap columns.

href

Optional, link target of the box.

fill

Optional, logical, fill the box with background color or surround it by box-shadow.

Value

column holding the info box

Author(s)

richard.kunze

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
## Only run examples in interactive R sessions
if (interactive()) {

library(shiny)
shinyApp(
  ui = fluidPage(
    init(),
    fluidRow(
      dq_infobox(
      "hello", 2, "world", shiny::icon("hashtag"),
      bgColor = "black", color = "#D00"
      ),
      dq_infobox("hello", "2", href="https://www.google.com"),
      dq_infobox("hello", 2, "world", "YOU", fill=F)
    )
  ),
  server = function(input, output) {
  }
)

}

daqana/dqshiny documentation built on Sept. 1, 2020, 4:31 p.m.