# NOT RUN {
## Buttons with badges
# Typically, you would use `renderBadge()` to update a badge's
# value. Here we are hard-coding a default value of 7.
buttonInput(
id = NULL,
label = "Process",
badgeOutput(
id = NULL,
7
) %>%
background("cyan")
)
## Possible colors
colors <- c(
"red", "purple", "indigo", "blue", "cyan", "teal", "green",
"yellow", "amber", "orange", "grey", "white"
)
div(
lapply(
colors,
function(color) {
badgeOutput(
id = NULL,
color
) %>%
background(color) %>%
margin(2)
}
)
) %>%
display("flex") %>%
flex(wrap = TRUE)
# }
Run the code above in your browser using DataLab