rating_input {shiny.semantic} | R Documentation |
Rating Input.
Description
Crates rating component
Usage
rating_input(
input_id,
label = "",
value = 0,
max = 3,
icon = "star",
color = "yellow",
size = ""
)
Arguments
input_id |
The |
label |
the contents of the item to display |
value |
initial rating value |
max |
maximum value |
icon |
character with name of the icon or |
color |
character with colour name |
size |
character with legal semantic size, eg. "medium", "huge", "tiny" |
Value
rating object
Examples
## 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)
}
[Package shiny.semantic version 0.5.1 Index]