rstudio / rstudio/flexdashboard
valueBox arguments inconsistent
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 848
- Forks
- 298
- PR merge metrics
- No merged PRs in 30d
Description
Both flexdashboard and shinydashboard have valueBox function, with similar arguments, in one we need to use icon = "fa-calendar" in the other icon = icon("calendar"), one has caption the other has subtitle, maybe harmonise them?
flexdashboard::valueBox(value, caption = NULL, icon = NULL, color = NULL, href = NULL)
shinydashboard::valueBox(value, subtitle, icon = NULL, color = "aqua", width = 4, href = NULL)
Related SO post
See example:
flexdashboard test.rmd
---
title: "My Icon"
output:
flexdashboard::flex_dashboard
---
```{r}
library(flexdashboard)
valueBox(42, caption = "my caption", icon = "fa-calendar")
```
Output:

shinydashboard
library(shiny)
library(shinydashboard)
ui <- dashboardPage(
dashboardHeader(),
dashboardSidebar(),
dashboardBody(
valueBox(42, "My Icon", icon = icon("calendar")),
)
)
server <- function(input, output) { }
shinyApp(ui, server)
Output:

Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the valueBox entry points in flexdashboard and shinydashboard, using the supplied test.rmd example and the comparable shinydashboard snippet to compare argument names and icon handling. Decide the harmonized API before changing it; done means the two valueBox interfaces behave consistently for the demonstrated caption/subtitle and icon use cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100