inst/builtin-templates/bslib-bare/modules/card/R/basic.R

ui_card_basic <- function() {

  shiny::tagList(
    shiny::column( width = 3L, card_with_code(
      card(
        title = "Basic Card Example",
        "Card body"
      )
    )),
    shiny::column( width = 3L, card_with_code(
      card(
        title = "Primary Card Example 1",
        class = "card-outline card-primary",
        'class = "card-outline card-primary"'
      )
    )),
    shiny::column( width = 3L, card_with_code(
      card(
        title = "Primary Card Example 2",
        class = "card-primary",
        'class = "card-primary"'
      )
    )),
    shiny::column( width = 3L, card_with_code(
      card(
        title = "Primary Card Example 3",
        class = "bg-primary",
        'class = "bg-primary"'
      )
    )),
    shiny::column( width = 3L, card_with_code(
      card(
        title = "Secondary Card",
        class = "card-secondary",
        'class = "card-secondary"'
      )
    )),
    shiny::column( width = 3L, card_with_code(
      card(
        title = "Success Card",
        class = "card-success",
        'class = "card-success"'
      )
    )),
    shiny::column( width = 3L, card_with_code(
      card(
        title = "Info Card",
        class = "card-info",
        'class = "card-info"'
      )
    )),
    shiny::column( width = 3L, card_with_code(
      card(
        title = "Warning Card",
        class = "card-warning",
        'class = "card-warning"'
      )
    )),
    shiny::column( width = 3L, card_with_code(
      card(
        title = "Danger Card",
        class = "card-danger",
        'class = "card-danger"'
      )
    )),
    shiny::column( width = 3L, card_with_code(
      card(
        title = "Dark Card",
        class = "card-dark",
        'class = "card-dark"'
      )
    )),
    shiny::column( width = 3L, card_with_code(
      card(
        title = "Light Card",
        class = "card-light",
        'class = "card-light"'
      )
    ))
  )

}

Try the shidashi package in your browser

Any scripts or data that you put into this service are public.

shidashi documentation built on April 10, 2026, 5:07 p.m.