Create a block of stars (ideal for rating)
bs4Stars(value, max = 5, color = "warning")
starBlock(value, max = 5, color = "warning")
Current value. Should be positive and lower or equal to max.
Maximum number of stars by block.
Star color. Valid colors are listed below:
primary
: #007bff
.
secondary
: #6c757d
.
info
: #17a2b8
.
success
: #28a745
.
warning
: #ffc107
.
danger
: #dc3545
.
gray-dark
: #343a40
.
gray
: #adb5bd
.
white
: #fff
.
indigo
: #6610f2
.
lightblue
: #3c8dbc
.
navy
: #001f3f
.
purple
: #605ca8
.
fuchsia
: #f012be
.
pink
: #e83e8c
.
maroon
: #d81b60
.
orange
: #ff851b
.
lime
: #01ff70
.
teal
: #39cccc
.
olive
: #3d9970
.
if(interactive()){
library(shiny)
library(bs4Dash)
shinyApp(
ui = dashboardPage(
dashboardHeader(),
dashboardSidebar(),
dashboardBody(
box(
title = "Star example",
starBlock(5),
starBlock(5, color = "fuchsia"),
starBlock(1, color = "danger"),
starBlock(3, color = "secondary")
)
),
title = "starBlock"
),
server = function(input, output) { }
)
}