| appButton {shinydashboardPlus} | R Documentation |
Create a large button ideal for web applications
appButton(url = NULL, label = NULL, icon = NULL, enable_badge = FALSE, badgeColor = NULL, badgeLabel = NULL)
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. |
David Granjon, dgranjon@ymail.com
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) { }
)
}