Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

taskItem

Custom taskItem


Description

Custom taskItem

Usage

taskItem(text, value = 0, color = "aqua", href = NULL, inputId = NULL)

Arguments

text

The task text.

value

A percent value to use for the bar.

color

A color for the bar. Valid colors are listed in validColors.

href

An optional URL to link to.

inputId

If not NULL, this item behaves like an action button.

Examples

if (interactive()) {
 library(shiny)
 library(shinydashboard)
 library(shinydashboardPlus)
 
 shinyApp(
   ui = dashboardPage(
     dashboardHeader(
       dropdownMenu(
         type = "tasks", 
         badgeStatus = "danger",
         taskItem(
           inputId = "mytask",
           value = 20, 
           color = "aqua",
           text = "Click me!"
         ),
         taskItem(
           value = 40, 
           color = "green",
           text = "Basic item"
         )
       )
     ),
     dashboardSidebar(),
     dashboardBody(),
     title = "Dashboard example"
   ),
   server = function(input, output) {
     observeEvent(input$mytask, {
       showModal(modalDialog(
         title = "Important message",
         "This is an important message!"
       ))
     })
   }
 )
}

shinydashboardPlus

Add More 'AdminLTE2' Components to 'shinydashboard'

v2.0.1
GPL (>= 2) | file LICENSE
Authors
David Granjon [aut, cre], RinteRface [cph], Almasaeed Studio [ctb, cph] (AdminLTE2 theme for Bootstrap 3), Guang Yang [ctb, cph] (ygdashboard original template), Winston Chang [ctb, cph] (Functions from shinydashboard), Victor Perrier [ctb] (improved the shinydashboardPlusGallery)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.