Package 'shinyRatings'

Title: An Intuitive Way of Providing Star Rating in a 'shiny' App
Description: A simple interface to integrate star ratings into your 'shiny' apps. It can be used for customer feedback systems, user reviews, or any application that requires user ratings. 'shinyRatings' offers a straightforward and customisable solution that enhances user engagement and facilitates valuable feedback collection.
Authors: Ronak Shah [aut, cre]
Maintainer: Ronak Shah <[email protected]>
License: MIT + file LICENSE
Version: 0.1.1
Built: 2024-11-03 03:04:37 UTC
Source: https://github.com/shahronak47/shinyratings

Help Index


Include ratings in shiny UI

Description

Include ratings in shiny UI

Usage

shinyRatings(inputId, no_of_stars = 5, default = no_of_stars, disabled = FALSE)

Arguments

inputId

The input slot that will be used to access the value of number of stars.

no_of_stars

Number of stars that you want to display on the UI.

default

Number of stars selected by default.

disabled

Keep number of stars as fixed? Disable the option of changing values

Value

Ratings to be added to UI definition

Examples

if(interactive()){
 library(shiny)
 library(shinyRatings)

ui <- fluidPage(
  shinyRatings('star'), 
  textOutput('text')
)

server <- function(input, output, session) {
   output$text <- renderText({paste("No. of stars : ", input$star)})
}

shinyApp(ui, server)
}