bs4Stars {bs4Dash}R Documentation

AdminLTE3 stars

Description

Create a block of stars (ideal for rating)

Usage

bs4Stars(value, max = 5, color = "warning")

starBlock(value, max = 5, color = "warning")

Arguments

value

Current value. Should be positive and lower or equal to max.

max

Maximum number of stars by block.

color

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.

Author(s)

David Granjon, dgranjon@ymail.com

Examples

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) { }
 )
}


[Package bs4Dash version 2.1.0 Index]