
Last chance! 50% off unlimited learning
Sale ends in
Crates rating component
rating_input(
input_id,
label = "",
value = 0,
max = 3,
icon = "star",
color = "yellow",
size = ""
)
rating object
The input
slot that will be used to access the value.
the contents of the item to display
initial rating value
maximum value
character with name of the icon or icon()
that is
an element of the rating
character with colour name
character with legal semantic size, eg. "medium", "huge", "tiny"
## Only run examples in interactive R sessions
if (interactive()) {
library(shiny)
library(shiny.semantic)
ui <- shinyUI(
semanticPage(
rating_input("rate", "How do you like it?", max = 5,
icon = "heart", color = "yellow"),
)
)
server <- function(input, output) {
observeEvent(input$rate,{print(input$rate)})
}
shinyApp(ui = ui, server = server)
}
Run the code above in your browser using DataLab