appButton {shinydashboardPlus}R Documentation

AdminLTE2 special large button

Description

Create a large button ideal for web applications

Usage

appButton(url = NULL, label = NULL, icon = NULL,
  enable_badge = FALSE, badgeColor = NULL, badgeLabel = NULL)

Arguments

url

if the button should redirect somewhere.

label

button label.

icon

button icon, if any. Should be written like "fa fa-times".

enable_badge

Whether to display a badge on the top-right corner of the button.

badgeColor

color of the badge: see here for a list of valid colors https://adminlte.io/themes/AdminLTE/pages/UI/general.html.

badgeLabel

text to display in the badge. I personally recommend you to only put numbers.

Author(s)

David Granjon, dgranjon@ymail.com

Examples

if (interactive()) {
 library(shiny)
 library(shinydashboard)
 shinyApp(
  ui = dashboardPage(
    dashboardHeader(),
    dashboardSidebar(),
    dashboardBody(
     box(
      title = "App Buttons",
      status = NULL,
      appButton(
        url = "http://google.com",
        label = "Users", 
        icon = "fa fa-users", 
        enable_badge = TRUE, 
        badgeColor = "purple", 
        badgeLabel = 891
      ),
      appButton(
        label = "Edit", 
        icon = "fa fa-edit", 
        enable_badge = FALSE, 
        badgeColor = NULL, 
        badgeLabel = NULL
      ),
      appButton(
        label = "Likes", 
        icon = "fa fa-heart-o", 
        enable_badge = TRUE, 
        badgeColor = "red", 
        badgeLabel = 3
      )
     )
    ),
    title = "App buttons"
  ),
  server = function(input, output) { }
 )
}


[Package shinydashboardPlus version 0.6.0 Index]