card: Card

Description Usage Arguments References Examples

View source: R/card.R

Description

Create a generic text card that displays an icon and title side by side. The title can be changed from the shiny server using the function update_card.

Usage

1
2
3
4
5
6
7
card(
  inputId,
  text,
  icon_name = "check_circle",
  icon_type = "outline",
  class = NULL
)

Arguments

inputId

a unique ID for the card

text

text or HTML string to display

icon_name

an rheroicons icon name

icon_type

an rheroicons icon type ("output" or "solid")

class

css classes to apply to the card

References

https://github.com/davidruvolo51/rheroicons

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
if (interactive()) {
  library(shiny)

  ui <- tagList(
    iceComponents::use_iceComponents(),
    iceComponents::container(
      iceComponents::page(
        tags$h2("Study Progress", style = "text-align: center;"),
        iceComponents::card(
          inputId = "experiments",
          text = as.character(
            tagList(
              tags$strong("200"),
              "experiments performed"
            )
          ),
          icon_name = "beaker",
          icon_type = "solid"
        )
      )
    )
  )

  server <- function(input, output) {
  }

  shinyApp(ui, server)
}

InControlofEffects/iceComponents documentation built on April 1, 2021, 5:51 a.m.