tabler_button: Custom Tabler action button

Description Usage Arguments Value Examples

View source: R/tabler.R

Description

Custom Tabler action button

Usage

1
tabler_button(inputId, label, status = NULL, icon = NULL, width = NULL, ...)

Arguments

inputId

The input slot that will be used to access the value.

label

The contents of the button or link–usually a text label, but you could also use any other HTML, like an image.

status

Button color.

icon

An optional icon() to appear on the button.

width

The width of the input, e.g. '400px', or '100%'; see validateCssUnit().

...

Named attributes to be applied to the button or link.

Value

A Tabler action button tag.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
if (interactive()) {
 library(shiny)
 ui <- tabler_page(
  tabler_body(
    tabler_button(
      "btn",
      HTML(paste("Value", textOutput("val"), sep = ":")),
      icon = icon("thumbs-up"),
      width = "25%"
    )
  )
 )

 server <- function(input, output) {
   output$val <- renderText(input$btn)
 }

 shinyApp(ui, server)
}

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