buttonInput( id = NULL, label = "Label" )
buttonInput( .style %>% background("primary"), id = NULL, label = "Label" )
Use the width()
utility to adjust the size of a button.
buttonInput( .style %>% background("danger") %>% width(75), # <- id = NULL, label = "Label" )
div( "Curabitur", linkInput(id = "link1", label = "vulputate"), "vestibulum lorem." )
Use a stretched button to make an entire card clickable.
card( .style %>% border("primary") %>% font("primary"), header = "Product summary", p("Here is a summary"), p("This is a second paragraph"), footer = list( buttonInput( .style %>% background("primary"), id = "seemore", label = "See more", stretch = TRUE ) ) )
Notice, when you hover over the card the mouse cursor changes and the button appears hovered. The card is now passing clicks on to the button. Clicking anywhere on the card will trigger a click on the button.
card( header = "Card with stretched button", p("Notice when you hover over the card, the button also detects ", "the hover."), buttonInput( .style %>% background("primary"), id = NULL, label = "Label", stretch = TRUE ) )
Pair a download button input with shiny::downloadHandler()
.
buttonInput( download = TRUE, # <- id = NULL, label = "Download", tags$i(class = "fas fa-download") )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.