Learn R Programming

shinydashboardPlus (version 2.0.3)

productList: AdminLTE2 product list container

productList creates a container to display commercial items in an elegant container. Insert in a box.

Description

productListItem creates a product item to insert in productList.

Usage

productList(...)

productListItem(..., image = NULL, title = NULL, subtitle = NULL, color = NULL)

Arguments

...

product description.

image

image url, if any.

title

product name.

subtitle

product price.

color

price color: see here for a list of valid colors https://adminlte.io/themes/AdminLTE/pages/UI/general.html. See below:

  • light-blue (primary status): shinydashboardPlus:::rd_color_tag("#3c8dbc").

  • red (danger status): shinydashboardPlus:::rd_color_tag("#dd4b39").

  • green (success status): shinydashboardPlus:::rd_color_tag("#00a65a").

  • aqua (info status): shinydashboardPlus:::rd_color_tag("#00c0ef").

  • yellow (warning status): shinydashboardPlus:::rd_color_tag("#f39c12").

  • blue: shinydashboardPlus:::rd_color_tag("#0073b7").

  • navy: shinydashboardPlus:::rd_color_tag("#001F3F").

  • teal: shinydashboardPlus:::rd_color_tag("#39CCCC").

  • olive: shinydashboardPlus:::rd_color_tag("#3D9970").

  • lime: shinydashboardPlus:::rd_color_tag("#01FF70").

  • orange: shinydashboardPlus:::rd_color_tag("#FF851B").

  • fuchsia: shinydashboardPlus:::rd_color_tag("#F012BE").

  • purple: shinydashboardPlus:::rd_color_tag("#605ca8").

  • maroon: shinydashboardPlus:::rd_color_tag("#D81B60").

  • black: shinydashboardPlus:::rd_color_tag("#111").

  • gray: shinydashboardPlus:::rd_color_tag("#d2d6de").

Author

David Granjon, dgranjon@ymail.com

Examples

Run this code

# Box with productList
if (interactive()) {
 library(shiny)
 library(shinydashboard)
 library(shinydashboardPlus)
 
 shinyApp(
  ui = dashboardPage(
    dashboardHeader(),
    dashboardSidebar(),
    dashboardBody(
     box(
      title = "Product List",
      status = "primary",
      productList(
        productListItem(
          image = "https://www.pngmart.com/files/1/Haier-TV-PNG.png", 
          title = "Samsung TV", 
          subtitle = "$1800", 
          color = "yellow",
          "This is an amazing TV, but I don't like TV!"
        ),
        productListItem(
          image = "https://upload.wikimedia.org/wikipedia/commons/7/77/IMac_Pro.svg", 
          title = "Imac 27", 
          subtitle = "$4999", 
          color = "red",
          "This is were I spend most of my time!"
        )
      )
     )
    ),
    title = "Product List"
  ),
  server = function(input, output) { }
 )
}

Run the code above in your browser using DataLab