tabler_ribbon: Create a Tabler ribbon component

Description Usage Arguments Value Examples

View source: R/tabler.R

Description

This is a good complement to tabler_card. The ribbon parameters are listed at https://preview-dev.tabler.io/docs/ribbons.html.

Usage

1
tabler_ribbon(..., position = NULL, color = NULL, bookmark = FALSE)

Arguments

...

Ribbon text.

position

Ribbon position.

color

Ribbon color.

bookmark

Ribbon style. FALSE by default.

Value

A ribbon shiny tag.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
if (interactive()) {
 library(shiny)
 my_card <- tabler_card(title = "Ribbon", status = "info")
 my_card$children[[1]] <- my_card$children[[1]] %>%
 tagAppendChild(
   tabler_ribbon(
     icon("info-circle", class = "fa-lg"),
     bookmark = TRUE,
     color = "red"
   )
 )

 ui <- tabler_page(
  tabler_body(
    my_card
  )
 )
 server <- function(input, output) {}
 shinyApp(ui, server)
}

DivadNojnarg/outstanding-shiny-ui-code documentation built on Nov. 2, 2021, 12:03 p.m.